![]() | | ||||||||
| | #1 |
| Full Frontal Lobe Nudity War Room Member Join Date: Aug 2009 Location: Knoxville, TN
Posts: 912
Thanks: 519
Thanked 492 Times in 205 Posts
|
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'];
} 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'];
} Code: if(isset($_GET['custom%20 school'])) {
$name = $_GET['custom%20school'];
} Any help would be greatly appreciated. Kevin |
| | |
| | |
| | #2 |
| Selling Online Since 1998 War Room Member Join Date: Oct 2009 Location: Orange County, CA
Posts: 17
Thanks: 0
Thanked 2 Times in 1 Post
|
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 | |
| | |
![]() |
|
| Tags |
| aweber, custom, field, grabbing |
| Thread Tools | |
| |
![]() |