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... 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>"; 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 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! Link to comment https://forums.phpfreaks.com/topic/158264-solved-get-isnt-working/#findComment-834701 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.