-
-
Save kingcoyote/2999739 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<body> | |
<?php | |
$selectname=$_POST['selectedname']; | |
$selectid=$_POST['selectedid']; | |
$username="nevadabo_stafdir"; | |
$password="C_9-DzR_OIx("; | |
$database="nevadabo_staffinfo"; | |
$sheet="staffcity"; | |
echo "<strong><center><font size = 'large'>"; | |
echo $selectname; | |
echo"</strong>"; | |
echo "<br><br>"; | |
echo "<table class='zero' border='0' cellpadding='0' cellspacing='0' >"; | |
echo "<tr>"; | |
echo "<td bgcolor='red' class='pad'><strong><center><font class='white'>Year</font></center></strong></td>"; | |
echo "<td bgcolor='red' width='30'> </td>"; | |
echo "<td bgcolor='red' class='pad'><strong><center><font class='yellow'>Role</font></center></strong></td>"; | |
echo "<td bgcolor='red' width='10'> </td>"; | |
echo "</tr>"; | |
mysql_connect(localhost,$username,$password); | |
@mysql_select_db($database) or die( "Unable to select database"); | |
$query = "SELECT staffcity.Year as Year, staffcity.City as City, staffcity.Counselor_Role as Role, staffid.Name as Name FROM $sheet, staffid where (staffcity.Counselor_Name == staffid.id) order by year desc, role desc"; | |
$result = mysql_query($query); | |
$counter=0; | |
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) | |
{ | |
if ($row['staffid.id']== $selectid) | |
{$counter++; | |
echo "<tr><td class='pad'><font class=content><valign = 'top'>"; | |
echo "{$row['Year']}"; | |
echo "</font></td><td></td><td><font class=content>"; | |
echo "{$row['Counselor_Role']}"; | |
echo "<br>";} | |
else | |
$counter++; | |
} | |
//echo "<br><br>"; | |
mysql_close(); | |
?> | |
</head> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment