Newsletter signup

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • F.N.

    Newsletter signup

    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("localh ost","ddbb_user ","password ")))
    { echo "Error..."; exit(); }
    if (!mysql_select_ db("ddbb_databa se",$link))
    { echo "Error..."; exit(); }
    return $link; }
    $link=ConnectDB ();

    $email=$_GET['email'];
    mysql_query ("INSERT INTO mydb_list (list_email) VALUES ('$email')");
    mysql_close($li nk);
    ?>

    <html>
    <head>
    </head>
    <body>
    Your email: <?php echo $_GET['email'] ?>
    </body>
    </html>



    Regards,
    J.A. (F.N.)

Working...