Jump to content

Delete from table


shenmue232

Recommended Posts

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 ('[email protected]')' 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

 

Link to comment
https://forums.phpfreaks.com/topic/68086-delete-from-table/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.