Re: Parse Error, Unexpected $

From: Date: Mon, 19 Jul 2004 10:32:07 +0000
Subject: Re: Parse Error, Unexpected $
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-190993@lists.php.net to get a copy of this message
I see one problem, but not the one you are talking about. > // Convert Values to Variables: > $Title = $_POST[Title]; This (and the rest of the post fields) should have quotes: $Title = $_POST["Title"]; (php looks for a constant named Title, instead of the string "Title") What line gives you the parse error? On Mon, 19 Jul 2004 11:10:09 +0100, Harlequin <michael.mason@arraspeople.co.uk> wrote: > I've checked my syntax but obviously missing something. > > Would anyone mind a quick scan: > > // Convert Values to Variables: > $Title = $_POST[Title]; > $ChristianName = $_POST[ChristianName]; > $MiddleName = $_POST[MiddleName]; > $Surname = $_POST[Surname]; > $HomePhone = $_POST[HomePhone]; > $Address01 = $_POST[Address01]; > $Address02 = $_POST[Address02]; > $Address03 = $_POST[Address03]; > $City = $_POST[City]; > $Postcode = $_POST[Postcode]; > $Country = $_POST[Country]; > $Nationality = $_POST[Nationality]; > $Gender = $_POST[Gender]; > $WorkPermitRequired = $_POST[WorkPermitRequired]; > $MyStatus = $_POST[MyStatus]; > > // Dump Data Into MembersData: > $UserDataDump = "INSERT INTO MembersData (Title, ChristianName, > MiddleName, Surname, DOB, TelephoneHome, Address01, Address02, Address03, > AddressCity, AddressPostcode, AddressCountry, Nationality, Gender, > WorkPermit, Status) > > > VALUES('$Title','$ChristianName','$MiddleName','$Surname','$HomePhone','$Add > > ress01','$Address02','$Address03','$City','$Postcode','$Country','$Nationali > ty','$Gender','$WorkPermitRequired','$MyStatus')"; > mysql_query($UserDataDump) or die("Couldn't Create User Data Entry. MySQL > Error: " . mysql_error()); > > -- > ----------------------------- > Michael Mason > Arras People > www.arraspeople.co.uk > ----------------------------- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Jim Root jimroot@gmail.com

« previous php.general (#190993) next »