I am in need of a some help if possible. What I want to do is: Send Newsletter, then I want to Track who "clicked on the ads" and auto link to the website URL.
This is what I have so far:
<?php
if( $_GET["email"]) { echo $_GET["email"];}
$email = $_GET["email"];
$page = $_GET["page"];
mysql_connect("localhost", "dbname", "password") or die(mysql_error());
mysql_select_db("dbname") or die(mysql_error());
$redirect = mysql_real_escape_string($_GET['page']);
$page_insert = mysql_query("INSERT INTO tracking_table (`email`, `rec_use_date`) VALUES ('$email', now())") or die(mysql_error());
header("Location:$redirect");exit;
?>
What I have will save to the database, but won't redirect to the URL:
http://www.malaysiastreet.com/tracking/[email protected]&page=http://www.google.com
Use
base64_decode($_GET["return_url"]);
to get the URl of the user..