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
shivam0101
Forum Contributor
Posts: 197 Joined: Sat Jun 09, 2007 12:09 am
Post
by shivam0101 » Sat Sep 15, 2007 8:16 am
Code: Select all
$form_url=\".$_SERVER['PHP_SELF'].?process=edit"\;
I am getting error, parse error, unexpected T_ENCAPSED_AND_WHITESPACE,
Last edited by
shivam0101 on Sat Sep 15, 2007 12:36 pm, edited 1 time in total.
jeffery
Forum Contributor
Posts: 105 Joined: Mon Apr 03, 2006 3:13 am
Location: Melbourne, Australia
Contact:
Post
by jeffery » Sat Sep 15, 2007 8:26 am
so the correct way to write it is:
Code: Select all
$form_url = $_SERVER['PHP_SELF'] . '?process=edit';
or
Code: Select all
$form_url = "{$_SERVER['PHP_SELF']}?process=edit";
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sat Sep 15, 2007 8:29 am
....or avoiding the use of PHP_SELF entirely, since it contains user input.