I am coding a PM system for my client script however when I make the code to insert a message into the database using a form I get the following error:
Parse error: syntax error, unexpected T_STRING in /home/uberweb/public_html/clients/messages.php on line 164
Here are the offending lines of code:
160: <?php
161: $recipientc = $_POST['recipient'];
162: $subjectc = $_POST['subject'];
163: $messagec = $_POST['message'];
164: INSERT INTO messages (recipient,subject,message,read,sender) VALUES ('$recipientc','$subjectc','$messagec', 'No', '$session->username');
165: ?>
Could you please tell me how to fix this error
I always start the SQL connection at the top of my document.
Macadamean using your insert code fixed it
You will get best answer as soon as I can select the option 
Parse error: syntax error, unexpected T_STRING in /home/uberweb/public_html/clients/messages.php on line 164
Here are the offending lines of code:
160: <?php
161: $recipientc = $_POST['recipient'];
162: $subjectc = $_POST['subject'];
163: $messagec = $_POST['message'];
164: INSERT INTO messages (recipient,subject,message,read,sender) VALUES ('$recipientc','$subjectc','$messagec', 'No', '$session->username');
165: ?>
Could you please tell me how to fix this error
I always start the SQL connection at the top of my document.
Macadamean using your insert code fixed it