[Q] Grabbing a Custom Field GET from AWeber in PHP

7 replies
For years I have used pages to grab the GET info forwarded from AWeber to insert a name or some other information into a web page dynamically. I recently tried to do that with a custom field passed from AWeber and it's not working.

Not sure why.

Here is a typical piece of code I use to grab the name field:

PHP Code:
if(isset($_GET['name'])) {

$name $_GET['name'];


If I set up a custom field (lets say "school" to designate what
school the lead attends) AWeber passes it like this in the GET:

?custom%20school=osu

When I try this code it fails:

PHP Code:
if(isset($_GET['custom school'])) {

$name $_GET['custom school'];


This code also fails:

PHP Code:
 if(isset($_GET['custom%20 school'])) {
 
 
$name $_GET['custom%20school'];
 
 } 
I'm sure this is some simple answer, but I know just enough about PHP to be dangerous.

Any help would be greatly appreciated.

Kevin
#aweber #custom #field #grabbing
  • Profile picture of the author RichPirate
    I believe it's actually not proper formatting in PHP to have spaces in GET variable. From what I can gather it converts them to '_'.

    Try:

    if(isset($_GET['custom_school'])) {

    $name = $_GET['custom_school'];

    }


    If that doesn't work, I would suggest changing your aweber variable names to something without spaces.

    hope this helps.
    {{ DiscussionBoard.errors[1322786].message }}
  • Profile picture of the author Bruce Hearder
    You could do a quick test and see what variables Aweber is passign back to you..

    At the top of your thankyou page, insert the following PHP code :

    echo '<pre>';
    print_r($_GET);
    echo '</pre>';

    This will "dump" all the variablers that Aweber is sending back to you and you can see what to extract..

    I hope this helps

    Bruce
    {{ DiscussionBoard.errors[1324061].message }}
    • Profile picture of the author ryanyu
      Originally Posted by Bruce Hearder View Post

      You could do a quick test and see what variables Aweber is passign back to you..

      At the top of your thankyou page, insert the following PHP code :

      echo '<pre>';
      print_r(Array);
      echo '</pre>';

      This will "dump" all the variablers that Aweber is sending back to you and you can see what to extract..

      I hope this helps

      Bruce
      Thanks Bruce, it helped a lot!
      {{ DiscussionBoard.errors[5426711].message }}
  • Profile picture of the author ermac2014
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[1339106].message }}
  • Profile picture of the author FrontpageContent
    I had same problem and the underscore worked for me as well...

    Thanks :-)
    {{ DiscussionBoard.errors[8129777].message }}

Trending Topics