Code: Select all
mysql_connect("localhost","$username","$password") or die ("Unable to connect to MySQL server.");
$db = mysql_select_db("$database") or die ("Unable to select requested database.");
$query="SELECT * FROM teachers ORDER BY id ASC";
$result=mysql_query($query);
$main = "<form method='POST' action='delete.php?a=verify'>
<table border='0' width='100%' cellspacing='0' cellpadding='0' id='table10'>
<tr>
<td align='center' width='100%' colspan='2'>
<b><font size='2'>*NOTE*: Don't abuse this power...</font></b></td>
</tr>
<tr>
<td height='10'>
</td>
</tr>
<tr>
<td align='right' width='50%' valign='top'>
<p align='right'><b>Your Name:</b></td>
<td align='left' width='50%'>$_COOKIEїusername]<br>
<font size='2'>(To login under a different username, </font>
<a href='http://www.****.com/login.php?a=logout'>
<font size='2'>click here.)</font></a></td>
</tr>
<tr>
<td align='right' width='50%'><b>Teacher that will be deleted:</b></td>
<td width='50%' align='left'>
<select name='filter_teachers'>
<option value='showall'>Choose a Teacher</option>
<option>----------------------</option>";
while ($teacher = mysql_fetch_array($result)) {
$main .= "<option value='$teacherїusername]'>$teacherїusername]</option>\n";
}
$main .= "</select>
</td>
</tr>
<tr>
<td align='right' width='50%'> </td>
<td align='left' width='50%'> </td>
</tr>
</table>
<p>
<input type='submit' value='Proceed' name='submit' tabindex='3' style='font-weight: bold; border-style: dashed; border-width: 1px; background-color: #999999'></p>
</form>";