Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 10-27-2009, 12:54 PM   #1
Full Frontal Lobe Nudity
War Room Member
 
Kevin-VirtualProfitCenter's Avatar
 
Join Date: Aug 2009
Location: Knoxville, TN
Posts: 912
Thanks: 519
Thanked 492 Times in 205 Posts
Social Networking View Member's Twitter Profile 
Default [Q] Grabbing a Custom Field GET from AWeber in PHP

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:

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:


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

$name = $_GET['custom school'];

}
This code also fails:

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

Kevin-VirtualProfitCenter is offline   Reply With Quote
Old 11-01-2009, 10:16 PM   #2
Selling Online Since 1998
War Room Member
 
MemberCon's Avatar
 
Join Date: Oct 2009
Location: Orange County, CA
Posts: 17
Thanks: 0
Thanked 2 Times in 1 Post
Social Networking View Member's Twitter Profile  View Member's YouTube Profile
Default Re: [Q] Grabbing a Custom Field GET from AWeber in PHP

I put a small file named test.php on my server, and put this code inside it:

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

then I visited the URL in my browser like this:

http://www.YOURDOMAINHERE.com/test.p...m%20school=osu

and it printed out:

Array
(
[custom_school] => osu
)

The %20 (URL encoded "space" character) is transformed into an underscore, so the proper GET variable is:

$_GET['custom_school']

PHP will transform characters that are not valid in variable names into underscores (PHP: Variables From External Sources - Manual)

How we sell content, subscriptions and memberships - Lessons learned and money made: Membercon.com
MemberCon is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Tags
aweber, custom, field, grabbing

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 04:57 AM.