homepage Welcome to WebmasterWorld Guest from 54.166.255.168
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP_SELF Question
PumpkinHead

10+ Year Member



 
Msg#: 11117 posted 12:16 pm on Dec 20, 2005 (gmt 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?

 

proper_bo

10+ Year Member



 
Msg#: 11117 posted 12:25 pm on Dec 20, 2005 (gmt 0)

you want to stick this on the end:

$_SERVER['QUERY_STRING']

Mr_Fern

5+ Year Member



 
Msg#: 11117 posted 12:26 pm on Dec 20, 2005 (gmt 0)

PHP_SELF is only the file, not the file along with the query string... use $_SERVER['REQUEST_URI'] instead

PumpkinHead

10+ Year Member



 
Msg#: 11117 posted 4:40 pm on Dec 20, 2005 (gmt 0)

Many thanks :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved