Posted by Balazs Wellisch on 01/02/06 05:47
> I have a question regarding a form's action attribute to send the user
> submitted data to $_SERVER[PHP_SELF] (the same page). The problem for
> me, is that is this doesn't give the complete URL (the
> http://www.myhost.com part). It only gives the /filename.php part.
> Therefore, when I enter some info into the text field (on the page with
> the form) and click submit, I get "The page cannot be displayed". How
> can this be resolved?
>
$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'] or
$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']
See http://us2.php.net/reserved.variables for what else is available.
Balazs
Navigation:
[Reply to this message]
|