[EMAIL PROTECTED] wrote:
However, Problem application is giving me is in case I unsubscribe one email it deletes all emails from database. table. I have pasted php code and mysql dump. Any guidance, please.
//add record
$sql = "insert into kemails values('', '$_POST[email]')";
//unsubscribe the address
$id = mysql_result($check_result, 0, "id");
$sql = "delete from kemails where id = '$id'";
$result = mysql_query($sql,$conn) or die(mysql_error());
$display_block = "<P>You're unsubscribed!</p>";
mysql> describe kemails
-> ;
+-------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
| id | int(11) | | PRI | 0 | |
| email | varchar(150) | | PRI | | |
+-------+--------------+------+-----+---------+-------+
2 rows in set (0.00 sec)
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
