Here is what I have so far:
<?php
require_once("../config.php");
mysql_connect("$database_server","$database_username","$database_password");
mysql_select_db("$database_name");
$sql = "SELECT * FROM ".$database_prefix."_subscribe";
$result = mysql_query($sql);
echo("<div align=\"center\">
<center>
<form method=\"post\">
<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"50%\">
<tr>
<td bgcolor=\"#000000\">
<p align=\"center\"><b><font color=\"#FFFFFF\" size=\"2\" face=\"Verdana\">Delete</font></b></td>
<td bgcolor=\"#000000\"><b><font color=\"#FFFFFF\" size=\"2\" face=\"Verdana\">Name</font></b></td>
<td bgcolor=\"#000000\"><b><font color=\"#FFFFFF\" size=\"2\" face=\"Verdana\">Email Address</font></b></td>
</tr>");
While ($row = mysql_fetch_array($result)) {
$id = $row['ID'];
$email = $row['Email'];
$name = $row['Name'];
echo("<tr>
<td bgcolor=\"#E6E6E6\">
<p align=\"center\"><font size=\"1\" face=\"Verdana\"><input type=\"checkbox\" name=\"delete\" value=\"".$id."\"></font></td>
<td bgcolor=\"#E6E6E6\"><font size=\"1\" face=\"Verdana\">".$name."</font></td>
<td bgcolor=\"#E6E6E6\"><font size=\"1\" face=\"Verdana\">".$email."</font></td>
</tr>");
}
echo("</table>
<br>
<input type=\"submit\" value=\"Delete\" name=\"delete\">
</form>
</center>
</div>");
mysql_close();
?>
So far, it basically just shows the database HMTL... What will I have to do to make this functional?
...I would like the script to works something like
If Post = delete
delete it
else
display users
Any help would be greatly appreciated.