Maybe I'm blind but I get an error in MySQL Syntax message for the following code:
<?
//Get the form variables
$recipient = $_POST['recipient'];
$from = $_POST['from'];
$sent = $_POST['sent'];
$message = $_POST['message'];
//Insert the message into the database for the recipient
$query = "INSERT INTO messaging SET
recipient = '".$recipient."',
from = '".$from."',
sent = '".$sent."',
msg = '".$message."'";
$result = mysql_query($query);
print mysql_error();
//Redirect back to send message form
// header("Location: message-add.php");
?>
It says to look for the right code to use near from = '".$from."', sent='".$sent."',
I can't see any issues. Any ideas?