Forum Moderators: coopster

Message Too Old, No Replies

$_server

problems with $_SERVER

         

timjmcg

10:08 pm on Jan 28, 2005 (gmt 0)

10+ Year Member



I am having trouble with this line:

<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" >

I get this error:
Parse error: parse error, unexpected '?'

Can anyone help with this?
Thanks very much.

mcibor

10:28 pm on Jan 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The code seems fine to me. Try putting sth eg <?PHP echo "foo";?>
It could be a problem with ' in $_SERVER['PHP_SELF'], eg. last ' is not an apostrophe, but `.
Otherwise no idea.

Michal Cibor

timjmcg

11:07 pm on Jan 28, 2005 (gmt 0)

10+ Year Member



thanks for the tip. i think there is some code above it ( i have an if else statement) that may be causing problems. any chance you could have a look at the code?
thanks.
tim

mcibor

9:23 am on Jan 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just paste it here. I'll have a look!

timjmcg

6:30 pm on Jan 31, 2005 (gmt 0)

10+ Year Member



Thanks so much for the offer. I worked on it all weekend and it turns out it was a faulty sql statement above. Thanks for your help!
regards
Tim

mcibor

9:22 pm on Feb 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



S... happens said Forest.

Good luck and till next time!
Michal Cibor