Akenatehm Posted November 30, 2008 Share Posted November 30, 2008 Hey Guys, I am getting the following error: Parse error: syntax error, unexpected T_IF in /home/kaurlcom/public_html/messenger/messageSend/send.php on line 16 With the following code: <?php include "connect.php"; if(isset($_POST['submit'])) { $message=$_POST['msg']; $username=$_POST['user']; $chat_id=$_POST['chatid']; $id = "chatid_$chat_id" if(strlen($message)<1) { print "Please Enter a Message."; } else { $insert = "INSERT INTO '$id' (username,message) VALUES ($username, $message)"; } } ?> Help would be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/134825-solved-unexpected-t_if/ Share on other sites More sharing options...
revraz Posted November 30, 2008 Share Posted November 30, 2008 Missing semi colon $id = "chatid_$chat_id" <--------- Link to comment https://forums.phpfreaks.com/topic/134825-solved-unexpected-t_if/#findComment-702092 Share on other sites More sharing options...
Akenatehm Posted November 30, 2008 Author Share Posted November 30, 2008 Sweet. Thanks. Link to comment https://forums.phpfreaks.com/topic/134825-solved-unexpected-t_if/#findComment-702104 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.