Bman900 Posted May 14, 2009 Share Posted May 14, 2009 I am trying to set up my script to be compatible with aweber and for them to automaticly add subscribers I need to use their forms. They pass on the variables in the url like: http://www.url.com/draft/redirect.php?custom%20question=keyword2&from=balint20b05%40yahoo.com&meta_adtracking=&meta_message=1&meta_required=from&meta_split_id=&meta_web_form_id=1675361340&name=Callipers&submit=Here%20is%20my%20Question&unit=bmantest How would I use there in my script? Since I had my own form right now I have this code: $question = $_POST['question']; $firstname = $_POST['name_first']; $email = $_POST['email']; how would I get info in the CGI variables into my variables in the script? Quote Link to comment https://forums.phpfreaks.com/topic/158169-how-to-use-cgi-variables/ Share on other sites More sharing options...
Brian W Posted May 14, 2009 Share Posted May 14, 2009 URL string variables are accessible through $_GET, not $_POST... $question = $_GET['question']; $firstname = $_GET['name_first']; $email = $_GET['email']; use this to find out the array keys to use in a very readable fashion: <?php die("<pre>".print_r($_GET, TRUE)."</pre>"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/158169-how-to-use-cgi-variables/#findComment-834305 Share on other sites More sharing options...
DyslexicDog Posted May 14, 2009 Share Posted May 14, 2009 Those would be accessed using the $_GET[' '] superglobal Quote Link to comment https://forums.phpfreaks.com/topic/158169-how-to-use-cgi-variables/#findComment-834306 Share on other sites More sharing options...
Bman900 Posted May 14, 2009 Author Share Posted May 14, 2009 Thank you, that worked! Quote Link to comment https://forums.phpfreaks.com/topic/158169-how-to-use-cgi-variables/#findComment-834313 Share on other sites More sharing options...
DyslexicDog Posted May 14, 2009 Share Posted May 14, 2009 Be sure to mark your topic as solved. Quote Link to comment https://forums.phpfreaks.com/topic/158169-how-to-use-cgi-variables/#findComment-834361 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.