Jump to content

[SOLVED] Unexpected T_IF


Akenatehm

Recommended Posts

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

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.