Parse error: parse error, unexpected T_VARIABLE, expecting '

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

Parse error: parse error, unexpected T_VARIABLE, expecting '

Post 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.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

You need a semicolon after the echo too.

Code: Select all

echo $title . $inpContent . $sletter ;<-- Semi colon ends the statement!
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

Post 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.
Post Reply