Bman900 Posted May 15, 2009 Share Posted May 15, 2009 So I have this URL: http://www.sitename.com/draft/redirect.php?custom question=hello&from=balint20ssb05%40yahoo.com&meta_adtracking=&meta_message=1&meta_required=from&meta_split_id=&meta_web_form_id=1675361340&name=Balint&submit=Here%20is%20my%20Question&unit=bmantest Here is what I have: <php? $question = $_GET['custom question']; $firstname = $_GET['name']; $email = $_GET['from']; ?> The name and email get captured fine but that question field just doesn't want to work... Quote Link to comment https://forums.phpfreaks.com/topic/158264-solved-get-isnt-working/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 15, 2009 Share Posted May 15, 2009 That's because a space in a variable name is not valid, so php converts spaces to _ How about checking what you are actually getting - echo "<pre>"; echo "GET:"; print_r($_GET); echo "</pre>"; Quote Link to comment https://forums.phpfreaks.com/topic/158264-solved-get-isnt-working/#findComment-834696 Share on other sites More sharing options...
nadeemshafi9 Posted May 15, 2009 Share Posted May 15, 2009 custom question in the url must be custom_question for it to be registered in $_GET Quote Link to comment https://forums.phpfreaks.com/topic/158264-solved-get-isnt-working/#findComment-834698 Share on other sites More sharing options...
Bman900 Posted May 15, 2009 Author Share Posted May 15, 2009 Once I added the _ instead of the space it now works! Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/158264-solved-get-isnt-working/#findComment-834701 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.