Welcome to WebmasterWorld Guest from 54.196.208.6

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP_SELF Question

     
12:16 pm on Dec 20, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 15, 2004
posts:192
votes: 0


Hi,

I'm using PHP_SELF at the top of my form so that the current page is returned to once submit has been clicked. The problem is, I have a variable after the index.php that I need to keep...

E.g
index.php?function=add_msg

..and PHP_SELF doesn't hold this value, it just returns to index.php once clicked.

Is there an easy way to do this?

12:25 pm on Dec 20, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 8, 2004
posts:168
votes: 0


you want to stick this on the end:

$_SERVER['QUERY_STRING']

12:26 pm on Dec 20, 2005 (gmt 0)

Full Member

10+ Year Member

joined:July 22, 2005
posts:202
votes: 0


PHP_SELF is only the file, not the file along with the query string... use $_SERVER['REQUEST_URI'] instead
4:40 pm on Dec 20, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 15, 2004
posts:192
votes: 0


Many thanks :)