Page 1 of 1

parse error, unexpected T_STRING, expecting T_VARIABLE

Posted: Sun Sep 15, 2002 7:44 am
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

Posted: Sun Sep 15, 2002 11:01 am
by dusty
$HTTP_POST_VARS["name"] not HTTP_POST_VARS["name"]

Posted: Sun Sep 15, 2002 11:03 am
by hob_goblin
change

Code: Select all

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

Code: Select all

$rsEmployees__MMColParam1 = $_POST&#1111;'name'];

Posted: Mon Sep 16, 2002 2:24 pm
by Dai
Forgot the $ in $hhttp_post_vars not sure weather it's my eye sight or my typing that nedds shooting.

Posted: Mon Sep 16, 2002 5:14 pm
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