Driving me crazy...
Posted: Thu Dec 25, 2003 3:40 pm
Ok, this is driving me nuts. I made a form where someone types in their email address and it deletes it from a mysql DB. Here's the code:
Could i get help?
Code: Select all
<form method="POST" action="edit.php">
<table border="0" width="100%" id="table3">
<tr>
<td colspan="2">
<p align="center"><font face="Arial">If you would like to end
your membership with TidBitFacts.com, please type your email
below!</font></td>
</tr>
<tr>
<td align="right" width="50%"><font face="Arial">Your Email
Address:</font></td>
<td align="left">
<input type="text" name="delemail" size="25" style="border: 1px solid #C0C0C0"></td>
</tr>
</table>
<p align="center">
<input type="submit" value="deleteaccount" name="deleteaccount" style="border: 1px solid #000000"></p>
</form>
<? mysql_connect("localhost","awegweg","wegwelone") or die ("Unable to connect to MySQL server.");
$db = mysql_select_db("adsfadsfh") or die ("Unable to select requested database.");
if($_POST[deleteaccount]) {
$id=$_COOKIE[id]
DELETE FROM members WHERE id='$id';
}
?>