Petty_Crim Posted August 10, 2007 Share Posted August 10, 2007 Ok heres my problem I'm using a page that has already a $_GET in it, and when I click submit on my form it doesn't include the original get it and just includes the new $_GET. My page name is signup.php?page_id=19 It should do this: signup.php?page_id=19?game=football Instead it does this signup.php?game=football it leaves out the page_id bit. I'm using PHP_Self in the action of the submit button. Anyone know how to get both variables in the url? Quote Link to comment https://forums.phpfreaks.com/topic/64203-adding-a-get-to-a-page-that-already-has-a-get/ Share on other sites More sharing options...
trq Posted August 10, 2007 Share Posted August 10, 2007 $_SERVER['QUERY_STRING'] Quote Link to comment https://forums.phpfreaks.com/topic/64203-adding-a-get-to-a-page-that-already-has-a-get/#findComment-320051 Share on other sites More sharing options...
Petty_Crim Posted August 10, 2007 Author Share Posted August 10, 2007 $_SERVER['QUERY_STRING'] What does this do? Also I just added a hidden field called page_id and set its value to 19 and it worked. Is this an ok way to do it? Quote Link to comment https://forums.phpfreaks.com/topic/64203-adding-a-get-to-a-page-that-already-has-a-get/#findComment-320054 Share on other sites More sharing options...
trq Posted August 10, 2007 Share Posted August 10, 2007 Is this an ok way to do it? If you like. You could also make your action point to.... $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'] Quote Link to comment https://forums.phpfreaks.com/topic/64203-adding-a-get-to-a-page-that-already-has-a-get/#findComment-320057 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.