War Room

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

Featured Warrior Special Offer...
"Members Of The *War Room* Discover Secrets To Immediate Success!"
Reply
 
LinkBack Thread Tools
Old 10-27-2009, 12:52 PM   #1
Full Frontal Lobe Nudity
War Room Member
 
Kevin-VirtualProfitCenter's Avatar
 
Join Date: Aug 2009
Location: Knoxville, TN
Posts: 324
Thanks: 114
Thanked 92 Times in 61 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:

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

Kevin-VirtualProfitCenter is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-27-2009, 01:12 PM   #2
Active Warrior
War Room Member
 
Join Date: Oct 2009
Posts: 67
Thanks: 6
Thanked 9 Times in 7 Posts
Lightbulb Re: [Q] Grabbing a Custom Field GET from AWeber in PHP

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.
RichPirate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to RichPirate For This Useful Post:
Old 10-27-2009, 08:09 PM   #3
HyperActive Warrior
War Room Member
 
Bruce Hearder's Avatar
 
Join Date: May 2004
Location: Perth, Australia.
Posts: 406
Thanks: 2
Thanked 63 Times in 55 Posts
Social Networking View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Skype™ to Bruce Hearder
Default Re: [Q] Grabbing a Custom Field GET from AWeber in PHP

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

Get Indexed Faster, Visit PingMe Now!!, and get a FREE backlink as well!
Get Instant BackLinks To Any Site You want by running your own Blog Farm
Stop Google SideWiki from displaying unfavorable comments on your WordPress Blog. Beta testers needed for Wordpress Plugin : SideWiki Blocker
How I Get 50-150 1-way links per day, everyday : Find out what I do!
Bruce Hearder is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to Bruce Hearder For This Useful Post:
Old 11-01-2009, 07:26 AM   #4
Warrior Member
 
Join Date: Oct 2009
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
Default Re: [Q] Grabbing a Custom Field GET from AWeber in PHP

why did u use spaces? you cannot use spaces between the get variables..
replace them with _ or any other character..
ermac2014 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to ermac2014 For This Useful Post:
Old 11-02-2009, 10:41 PM   #5
Full Frontal Lobe Nudity
War Room Member
 
Kevin-VirtualProfitCenter's Avatar
 
Join Date: Aug 2009
Location: Knoxville, TN
Posts: 324
Thanks: 114
Thanked 92 Times in 61 Posts
Social Networking View Member's Twitter Profile 
Default Re: [Q] Grabbing a Custom Field GET from AWeber in PHP

Quote:
Originally Posted by ermac2014 View Post
why did u use spaces? you cannot use spaces between the get variables..
replace them with _ or any other character..
Aweber puts the space there, though the space is converted to %20 in the URL. I can't change it. Whatever I name the custom variable (school for example) Aweber precedes it with "custom " so it becomes custom%20school.

Kevin-VirtualProfitCenter is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2009, 09:37 AM   #6
Warrior Member
War Room Member
 
Join Date: Aug 2009
Posts: 10
Thanks: 1
Thanked 1 Time in 1 Post
Default Re: [Q] Grabbing a Custom Field GET from AWeber in PHP

$_GET['custom_VARIABLE'];

Worked for me.

Good Luck

Jim
blkfin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to blkfin For This Useful Post:
Old 11-03-2009, 09:40 PM   #7
Warrior Member
 
Mike P Smith's Avatar
 
Join Date: Nov 2009
Posts: 20
Thanks: 0
Thanked 4 Times in 3 Posts
Default Re: [Q] Grabbing a Custom Field GET from AWeber in PHP

Hi Kevin.

RichPirate and blkfin are correct - PHP will replace the "%20" with an underscore "_"

When I requested:

....?test=1&custom%20test=2

...and I dumped $_GET, this is what I get:

Array ( [test] => 1 [custom_test] => 2 )

HTH

--
Mike Smith
No sig yet!
Mike P Smith is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to Mike P Smith For This Useful Post:
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 01:41 AM.