WorldVision
05-12-2009, 10:48 AM
So I am trying to pass a variable from one html page to another using php, and then on the second page pass the variable contents into my email sign up when the user signs up. I am doing this for tracking purposes.
But I can't get the php to work, I know I have php installed on the server, and I have tried adding "AddType application/x-httpd-php .html" and "AddType application/x-httpd-php .htm" to my .htaccess file, but it only produces an pop up when I go to any of my sites pages saying "You have chosen to open..."
Here is the code itself
Page 1
The link on my "articlea" page sending the user to the newsletter sign up is like so:
http://www.mysite.com/newsletter.html?var=articlea
Page 2
The on the newsletter sign up page, I added this to my header:
<?php
$val = $_GET['var'];
?>
Then in my submit form, I have added this to pass the variable info on to my mailing list.
<input type="hidden" name="custom tid" value="<?php echo "$val"; ?>">
I am not a pro at this stuff, maybe someone here can see the mistake I am making. Thanks guys!
But I can't get the php to work, I know I have php installed on the server, and I have tried adding "AddType application/x-httpd-php .html" and "AddType application/x-httpd-php .htm" to my .htaccess file, but it only produces an pop up when I go to any of my sites pages saying "You have chosen to open..."
Here is the code itself
Page 1
The link on my "articlea" page sending the user to the newsletter sign up is like so:
http://www.mysite.com/newsletter.html?var=articlea
Page 2
The on the newsletter sign up page, I added this to my header:
<?php
$val = $_GET['var'];
?>
Then in my submit form, I have added this to pass the variable info on to my mailing list.
<input type="hidden" name="custom tid" value="<?php echo "$val"; ?>">
I am not a pro at this stuff, maybe someone here can see the mistake I am making. Thanks guys!