Page 1 of 1

unexpected T_VARIABLE

Posted: Mon Mar 08, 2004 1:17 am
by nitroxman
Can't for the life of me find the error in this line of code.

I get the ol' Parse error: parse error, unexpected T_VARIABLE in / site here /z_purple.php on line 14



Code: Select all

LINE 6   $email = $HTTP_POST_VARSї'email'];
LINE 7   $name = $HTTP_POST_VARSї'name'];
LINE 8   $mobile = $HTTP_POST_VARSї'mobile'];
LINE 9   $feildone = $HTTP_POST_VARSї'feildone'];
LINE 10  $feildtwo = $HTTP_POST_VARSї'feildtwo'];
LINE 11
LINE 12 // Sends an email to us via the Admin Address
LINE 13 $ourSubject = "Newsletter Sign Up from Website";
LINE 14 $ourBody = "A visitor of our "$sitename" website has left the LINE following information";
LINE 15 $ourBody .= "\nname:".$name;
LINE 16 $ourBody .= "\nemail:".$email;
LINE 17 $ourBody .= "\nmobile:".$mobile;
LINE 18 $ourBody .= "\nfeildone:".$feildone;
LINE 19 $ourBody .= "\nfeildtwo:".$feildtwo;

I've tried single ' and double " I've put in the .varible and no dot.

I'm using Edit Plus to work on the file.

Posted: Mon Mar 08, 2004 1:30 am
by markl999
Try $ourBody = 'A visitor of our "'.$sitename.'" website has left the LINE following information';

Posted: Mon Mar 08, 2004 1:38 am
by nitroxman
Thanks, that revealed a new one on Line 25, will use that convention to correct other line.

My understanding was the you don't put a dot in for teh first varible.

Hmm can't distinguish ' from " when they are together while using Edit Plus

Could be

Single then double '"
double then single "'

or three

single '''



Cheers!

Posted: Mon Mar 08, 2004 2:34 am
by nitroxman
nitroxman wrote:Thanks, that revealed a new one on Line 25, will use that convention to correct other line.

My understanding was the you don't put a dot in for teh first varible.

Hmm can't distinguish ' from " when they are together while using Edit Plus

Could be

Single then double '"
double then single "'

or three

single '''


OK, I'm up to line 32 now.

Has anyone got examples of links wheich are varibles?

Code: Select all

$theirBody .= "<a href='$siteaddress.'>".$sitename."</a></font></p>";


Cheers!

Posted: Mon Mar 08, 2004 2:37 am
by markl999
$alink = '<a href="'.$siteaddress.'">'.$sitename.'</a>';

Posted: Mon Mar 08, 2004 2:50 am
by nitroxman
Cheers!

I've fixed line 32 with

Code: Select all

$theirBody .= "<a href=".$siteaddress.">".$sitename."</a></font></p>";
Thank you all.