January 16th, 2013, 04:01 PM
PHP Mysql Script
I need help. I need to find a script that will do this: An email is sent to a prospect, in the email has marketing message and leads them to click on a button/link for more info, the link sends them to a landing page. (ie http://mysite/jim) the jim at the end is the username in our database. So what I need to do is have this link sent to a php page where i can take the username and match it to our affiliate member and send them to a page with the correct affiliate landing page. So the prospect clicks on the link goes to our php page our php page will look into the data base and sends the prospect to (http://mysite/jim), I need this dynamic because i dont want to have to create the same landing page for each affiliate member. Also in the landing page there is a submit button to take them to the actual affiliate order page, so i need php landing page to also be dynamic, get the username from the data base and append it to (http://mysite/jimoffer, or if its another affiliate http://mysite/johnoffer, etc). I am new to php so could use some major help, if you have written script or downloadable script, i could really use it. thanks.
January 16th, 2013, 04:31 PM
If you have your database ready to go, you'll need to retrieve the correct member's username - how are you determining that by the way?
Once you have that information, create the URL with the username on the end:
From there use something like this to send out nicely formatted emails: PHP Mailer
$url = "http://mysite.com/".$username;
Alternatively you can use PHP's native mail() function - [PHPNET="mail"]mail()[/PHPNET]
Then once the prospective person gets to the member's landing page, you can print out an HTML button with the correct order form value:
$to = 'firstname.lastname@example.org';
$subject = 'subject';
$message = 'your message here with the link and username';
$headers = 'From: email@example.com';
mail($to, $subject, $message, $headers);
This is all very bare bones but you should be able to build upon it. I didn't see any pre-built scripts from a quick Google but these tutorials should help you further
print "<input type='submit' value='".$username."' />";
Selecting from a database with PHP
Sending mail with PHP
Try out some of the stuff I wrote here and if you get stuck ask questions, people here are very knowledgable and willing to help.
"Those who can make you believe absurdities can make you commit atrocities."
January 16th, 2013, 08:19 PM
PHP5 - PHP Mysql Script
Thank you for responding. I don't need the email part of the php. I am using aweber as the email, what i really need is a the php script page to collect the data from the email button. The email button will have (h t t p: //mysite/username). When it is clicked it should go to the php page and then read from the database and put the information into the button of the landing page. So the landing page button will have this (h t t p: //mysite/username/username, putting the correct username that came from the link from the email. hope this makes sense.
Any one can help, thanks.