Hello, please I need help with this, i'm new to PHP I've been trying to figure out for over a week, an I've still found no answers.
I want to send out emails to the subscribers of my eBook. I want to include a link in the email, so when the link is clicked, the subscribers database will be updated.
When this link is clicked, the subscribers are redirected to my homepage.
So i'm having trouble with everything, from start to finish.
This is the code I've written so far:
Code:
<body>
<a href="" target="_blank">Click Here To Say YES!</a>
<?php
mysql_connect("localhost", "root", "");
mysql_select_db("rmn");
$sql = mysql_query("UPDATE subscribe SET confirmaton ='YES' WHERE email= [email]");
?>
</body>
Thank you very much!
/* close statement and connection */
$stmt->close();
}
I use prepare statements (prepare & bind_param) and this is in OPP format....go to PHP dot net for a procedural example if it will make more sense to you. Notice how the ? marks corresponds to all the fieldnames in the database in the prepare statement. Then on the next line it binds it to your prepare statement. The s (stands for string, i for integer...etc.) corresponds to how many variable you will be binding. Finally it is executed withe execute statement.
Doing something like this example will hopefully help you.
Bookmarks