Jump to content

How to use CGI variables?


Bman900

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/158169-how-to-use-cgi-variables/
Share on other sites

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>");
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.