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:52 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:

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   Reply With Quote
Old 10-27-2009, 01:12 PM   #2
Active Warrior
War Room Member
 
Join Date: Oct 2009
Posts: 88
Thanks: 8
Thanked 10 Times in 8 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   Reply With Quote
Old 10-27-2009, 08:09 PM   #3
Advanced Warrior
War Room Member
 
Bruce Hearder's Avatar
 
Join Date: May 2004
Location: Perth, Australia.
Posts: 717
Thanks: 4
Thanked 182 Times in 138 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 Your Backlinks indexed quicker at BackLinks2RSS

Create Full Text Feeds from Partial RSS Feeds at FeedExpander.com. See the WarriorForum post about it here
Bruce Hearder is offline   Reply With Quote
Old 11-02-2009, 10:41 PM   #4
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 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   Reply With Quote
Old 11-03-2009, 09:37 AM   #5
Doing Internet Long Time
War Room Member
 
blkfin's Avatar
 
Join Date: Aug 2009
Location: Earth
Posts: 83
Thanks: 21
Thanked 12 Times in 12 Posts
Default Re: [Q] Grabbing a Custom Field GET from AWeber in PHP

$_GET['custom_VARIABLE'];

Worked for me.

Good Luck

Jim
blkfin is offline   Reply With Quote
Old 11-03-2009, 09:40 PM   #6
Active Warrior
War Room Member
 
Mike P Smith's Avatar
 
Join Date: Nov 2009
Location: Charlotte, NC, USA
Posts: 30
Thanks: 2
Thanked 4 Times in 3 Posts
Social Networking View Member's Twitter Profile 
Contact Info
Send a message via Skype™ to Mike P Smith
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   Reply With Quote
Old 01-14-2012, 07:34 PM   #7
HyperActive Warrior
War Room Member
 
geeksfolder's Avatar
 
Join Date: Oct 2011
Location: Wellington, New Zealand
Posts: 19
Thanks: 3
Thanked 1 Time in 1 Post
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile 
Default Re: [Q] Grabbing a Custom Field GET from AWeber in PHP

Quote:
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!

geeksfolder 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 09:24 AM.