parse error, unexpected T_STRING, expecting 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
Dai
Forum Newbie
Posts: 16
Joined: Wed May 15, 2002 6:12 am

parse error, unexpected T_STRING, expecting T_VARIABLE

Post by Dai »

Can you help the following code is generating this error:
Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE
or '$' in C:\FoxServ\www\phakt\list.php on line 11


this is line 11:
<?php
$rsEmployees__MMColParam1 = "%";
if (isset(HTTP_POST_VARS["name"])) {
$rsEmployees__MMColParam1 = HTTP_POST_VARS["name"];
}
?>

I'm using phakt 1.5.1 with ultradev 4 using php4.2.2 as part foxserv
3 on win2k.
If you know of a way around this error I would apreciate the help.

(And before anyone say's visit the phakt forum I have but no answer as yet)

Thanks in advance

Dai
dusty
Forum Contributor
Posts: 122
Joined: Sun Apr 28, 2002 9:52 pm
Location: Portsmouth, VA

Post by dusty »

$HTTP_POST_VARS["name"] not HTTP_POST_VARS["name"]
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

change

Code: Select all

$rsEmployees__MMColParam1 = HTTP_POST_VARS&#1111;"name"];
to

Code: Select all

$rsEmployees__MMColParam1 = $_POST&#1111;'name'];
Dai
Forum Newbie
Posts: 16
Joined: Wed May 15, 2002 6:12 am

Post by Dai »

Forgot the $ in $hhttp_post_vars not sure weather it's my eye sight or my typing that nedds shooting.
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

hob_goblin wrote:change

Code: Select all

$rsEmployees__MMColParam1 = $HTTP_POST_VARS&#1111;"name"];
to

Code: Select all

$rsEmployees__MMColParam1 = $_POST&#1111;'name'];
If you have PHP4.1+ use $_POST if not use $HTTP_POST_VARS
Post Reply