Page 1 of 1

$_SERVER[PHP_SELF] - problem

Posted: Thu Oct 11, 2007 3:42 am
by r_amin

Code: Select all

<form name="myForm" action='$_SERVER[PHP_SELF]' onsubmit="return validate_form(this);" method="POST">
It returns the massage
The requested URL /web_PSoriasis/$_SERVER[PHP_SELF] was not found on this server.

what's the problem hare?


Please Help emmediately.

Posted: Thu Oct 11, 2007 8:37 am
by feyd
I suspect you aren't using echo()/print().

Re: $_SERVER[PHP_SELF] - problem

Posted: Thu Oct 11, 2007 10:03 am
by Christopher
Yes, is should either be:

Code: Select all

<form name="myForm" action='<?php echo $_SERVER[PHP_SELF]; ?>' onsubmit="return validate_form(this);" method="POST">

Code: Select all

echo "<form name=\"myForm\" action=\"$_SERVER[PHP_SELF]\' onsubmit=\"return validate_form(this);\" method=\"POST\">";