Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

$_PHP_SELF

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

$_PHP_SELF

Postby Sunny » Sun Oct 27, 2013 11:35 pm

Hi

What does action="<?php $_PHP_SELF ?> mean in the below line

<form method="post" action="<?php $_PHP_SELF ?>">

Thanks
Sunny
New php-forum User
New php-forum User
 
Posts: 23
Joined: Wed Nov 30, 2011 6:51 am

Re: $_PHP_SELF

Postby tiger » Mon Oct 28, 2013 12:03 am

For my understanding, it means that the webpage will submit to itself no matter what the file name is. so with the $_PHP_SELF you can put the php code inside the webpage (like what you did in your other post) not in another file, but the extension has to be .php NOT .html
tiger
New php-forum User
New php-forum User
 
Posts: 16
Joined: Thu Jun 23, 2011 9:28 pm

Re: $_PHP_SELF

Postby johnj » Mon Oct 28, 2013 12:29 am

I don't understand what you meant by $_PHP_SELF. I think it has to be
action="<?php echo $_SERVER['PHP_SELF']; ?>"

Please read about Server and execution environment information from the php manual.
johnj
php-forum Super User
php-forum Super User
 
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm


Return to PHP coding => General

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.