shenmue232 Posted September 5, 2007 Share Posted September 5, 2007 I get this error not sure what's wrong? ??? Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES ('mortalsombat@hotmail.com')' at line 3 Heres the code <html> <head> <link rel="stylesheet" href="style1.css" type="text/css" /> </head> <?php $con = mysql_connect(""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("shenmue232", $con); $sql="DELETE FROM tbl_emails WHERE VALUES ('$_POST[delete]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Your Email Has Been Deleted"; echo " $_POST[delete]"; mysql_close($con) ?> </html> Thanks Quote Link to comment https://forums.phpfreaks.com/topic/68086-delete-from-table/ Share on other sites More sharing options...
seanpearman Posted September 5, 2007 Share Posted September 5, 2007 ive got this issue myself at the moment. Still trying to solve it. Its because your <head> tags link to the .css file. Take a look at my post, http://www.phpfreaks.com/forums/index.php/topic,158134.0.html let me know if you find an answer! Quote Link to comment https://forums.phpfreaks.com/topic/68086-delete-from-table/#findComment-342230 Share on other sites More sharing options...
seanpearman Posted September 5, 2007 Share Posted September 5, 2007 I got it working! Try using the include function to import the <head> data. The include funtion needs to be positioned correctly, try putting it just in side the ?> Hope it helps. Quote Link to comment https://forums.phpfreaks.com/topic/68086-delete-from-table/#findComment-342263 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.