Hi, i´m new in php. This is for newsletter subscription
How can I add the following:
1.- email already in database
2.- subscribe/remove (from two radio buttons)
Like [www.siteinteractive.com/subscribe/ "Join Our Mailing List"]
To this code (or change it):
<?php
function ConnectDB()
{ if (!($link=mysql_connect("localhost","ddbb_user","pa ssword")))
{ echo "Error..."; exit(); }
if (!mysql_select_db("ddbb_database",$link))
{ echo "Error..."; exit(); }
return $link; }
$link=ConnectDB();
$email=$_GET['email'];
mysql_query ("INSERT INTO mydb_list (list_email) VALUES ('$email')");
mysql_close($link);
?>
<html>
<head>
</head>
<body>
Your email: <?php echo $_GET['email'] ?>
</body>
</html>
Regards,
J.A. (F.N.)