Re: PHP_SELF syntax

From: Date: Mon, 24 Feb 2003 01:11:07 +0000
Subject: Re: PHP_SELF syntax
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-136802@lists.php.net to get a copy of this message
On Sun, 23 Feb 2003 18:55:06 -0500, you wrote: >Could someone tell me why this code prompts a parse error. I have tried it >several different way. The statement is called from within a function: > >print "<form method=\"POST\" name=\"update_workshop\" >action=\"$_SERVER['PHP_SELF']\">\n"; echo ('<form method="POST" name="update_workshop" action="' . $_SERVER['PHP_SELF'] . '">' . "\n"); works for me (moved the variable outside the string). I first thought it might be a scope problem, but $_SERVER is apparently a superglobal so that's not it.

« previous php.general (#136802) next »