For print $PHP_SELF, or $_SERVER['PHP_SELF'] use:

<?php echo $_SERVER['PHP_SELF']; ?>

or the shortcur sintax:

<?=$_SERVER['PHP_SELF']?>

(if short_open_tag = On in php.ini)



----- Original Message ----- 
From: "Beauford.2005" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Sunday, July 06, 2003 1:43 AM
Subject: [PHP] Forms and PHP_SELF


> Hi,
> 
> I have a very simple form that searches a MySQL database and I want to
> be able to have the search appear on the same page as the search.
> 
>         <FORM NAME="search" METHOD="post" ACTION="<? $PHP_SELF; ?>">
>         <INPUT type=text size=30 name=player>
>         <INPUT TYPE="image" src="../images/submit.gif" width="75"
> height"30" value="submit">
>         </FORM>
> 
> The part that confuses me is how I run the code for the search.
> Currently I have it in a function and at the top of the script I have an
> IF statement that checks to see if the submit button has been pressed,
> if it has I go to the function. This is not working, and I'm not even
> sure this is the right way to go about it. 
> 
> I'm probably doing this wrong and would appreciate it if someone could
> set me straight.
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to