Page 1 of 1

Parse error: parse error, unexpected T_VARIABLE, expecting '

Posted: Tue Sep 13, 2005 6:35 pm
by ianhull
Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in C:\Xeneo\ProceduresManual\add_edit.php on line 8

Hi Guys,

Can anyone pleae help me with this one,

I have tried alsorts but I keep getting errors.

Code: Select all

<?php session_start();
include_once("connect.php");
$inpContent = $_POST['inpContent'];
$companyid1 = $_SESSION['companyid'];
$sletter = $_POST['letter'];
$title = $_POST['title'];
echo $title . $inpContent . $sletter
$insert = "INSERT INTO `procedures` (`Companyid`, `Letter`, `Title`, `Cpro`) VALUES ('$companyid1', '$sletter', '$title', '$inpContent')";
mysql_query($insert) or die(mysql_error());


?>
Just can't understand it.

Thanks in advance.

Posted: Tue Sep 13, 2005 6:40 pm
by Roja
You need a semicolon after the echo too.

Code: Select all

echo $title . $inpContent . $sletter ;<-- Semi colon ends the statement!

Posted: Tue Sep 13, 2005 6:45 pm
by ianhull
Thanks mate,

I will manage to pick it all up one day.

I would of thrown the towel in a long time ago if it wasn't for guys like you. :)

Thanks again.