Parse Error, Unexpected T_Variable

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
cscrofani
Forum Newbie
Posts: 7
Joined: Mon May 22, 2006 9:08 pm

Parse Error, Unexpected T_Variable

Post by cscrofani »

Hi Everyone,

I am getting this error, and am not sure why - Parse error: parse error, unexpected T_VARIABLE in c:\inetpub\wwwroot\zipcode_response.php on line 52

Here's the code that the error is referring to:

Code: Select all

$zipCode = $_Post ['ZipCode']

$updateRecord = new FX($serverIP,$webCompanionPort); //this is the line that the error message is referring to
$updateRecord -> SetDBData('FXCart.fp7','Orders_Temp');
$updateRecord -> SetDBPassword('pass','user');
$updateRecord -> AddDBParam('Order_No',$_SESSION['ordno']);
$updateRecord -> AddDBParam('ZipCode',$zipCode);

$updateRecordResult = $updateRecord -> FMEdit();
I'm just trying to update an existing record with a zip code. Y'all have any ideas?

Thanks,
Chris
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

Take a look at this line:

Code: Select all

$zipCode = $_Post ['ZipCode']
You're missing something ;)
cscrofani
Forum Newbie
Posts: 7
Joined: Mon May 22, 2006 9:08 pm

Post by cscrofani »

Har har har! How'd I miss that!
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

No need to start a new topic...
cscrofani wrote:Hi Everyone,

Now I am getting this error, and am not sure why - Undefined variable: _Post in c:\inetpub\wwwroot\zipcode_response.php on line 51

Here's the code that the error is referring to:

Code: Select all

$zipCode = $_Post ['ZipCode'];  //this is the line that the error message is referring to

$updateRecord = new FX($serverIP,$webCompanionPort);
$updateRecord -> SetDBData('FXCart.fp7','Orders_Temp');
$updateRecord -> SetDBPassword('pass','user');
$updateRecord -> AddDBParam('Order_No',$_SESSION['ordno']);
$updateRecord -> AddDBParam('ZipCode',$zipCode);

$updateRecordResult = $updateRecord -> FMEdit();
I'm just trying to update an existing record with a zip code, by grabbing post data from the previous page. Any ideas?

Thanks,
Chris
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

hint: variables are case sensitive.
cscrofani
Forum Newbie
Posts: 7
Joined: Mon May 22, 2006 9:08 pm

Post by cscrofani »

Man I'm on a roll today!

Thanks feyd
Post Reply