Guest User

Untitled

a guest
Nov 18th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. <html>
  2. <head>
  3.  
  4.  
  5. <body>
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. <?php
  13. $selectname=$_POST['selectedname'];
  14. $selectid=$_POST['selectedid'];
  15. $username="nevadabo_stafdir";
  16. $password="C_9-DzR_OIx(";
  17. $database="nevadabo_staffinfo";
  18. $sheet="staffcity";
  19.  
  20. echo "<strong><center><font size = 'large'>";
  21. echo $selectname;
  22. echo"</strong>";
  23. echo "<br><br>";
  24. echo "<table class='zero' border='0' cellpadding='0' cellspacing='0' >";
  25. echo "<tr>";
  26. echo "<td bgcolor='red' class='pad'><strong><center><font class='white'>Year</font></center></strong></td>";
  27. echo "<td bgcolor='red' width='30'> </td>";
  28. echo "<td bgcolor='red' class='pad'><strong><center><font class='yellow'>Role</font></center></strong></td>";
  29. echo "<td bgcolor='red' width='10'> </td>";
  30. echo "</tr>";
  31.  
  32.  
  33.  
  34.  
  35. mysql_connect(localhost,$username,$password);
  36.  
  37. @mysql_select_db($database) or die( "Unable to select database");
  38.  
  39. $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";
  40. $result = mysql_query($query);
  41. $counter=0;
  42.  
  43. while($row = mysql_fetch_array($result, MYSQL_ASSOC))
  44. {
  45.  
  46. if ($row['staffid.id']== $selectid)
  47. {$counter++;
  48. echo "<tr><td class='pad'><font class=content><valign = 'top'>";
  49. echo "{$row['Year']}";
  50. echo "</font></td><td></td><td><font class=content>";
  51. echo "{$row['Counselor_Role']}";
  52. echo "<br>";}
  53. else
  54. $counter++;
  55.  
  56.  
  57. }
  58. //echo "<br><br>";
  59. mysql_close();
  60.  
  61.  
  62.  
  63. ?>
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. </head>
  72. </html>
Add Comment
Please, Sign In to add comment