I have tried every format I could think of, I still get this stupid error when I use the same line in other pages.
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 ''inbox' SET delete = '1' WHERE mailID = '218'' at line 1
Here is the code i wrote.
<?
ini_set("session.cookie_domain"," .mytowndate.com");
session_start();
$myusername = $_SESSION['username'];
$mailID1 = $_GET["mailID"];
$host="localhost"; // Host name
$dbusername="********"; // Mysql username
$dbpassword="********"; // Mysql password
$db_name="trevors4_MTD"; // Database name
$tbl_name="inbox"; // Table name
// Connect to server and select databse.
mysql_connect("$host", "$dbusername", "$dbpassword")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$a = "1";
$sql = "UPDATE 'inbox' SET delete = '1' WHERE mailID = '$mailID1'; ";
mysql_query($sql)
or die(mysql_error());
header( 'Location: ************) ;
?>
Any help? I been beating my head over this.