Script to collect and store email addresses from a form

Discussion in 'PHP' started by jc@ukzone.com, Mar 23, 2010.

  1. #1
    I need a script to collect email addresses from a form and store them in a file or database.
    I need it for email shots to subscribers.
    Has anybody any ideas wher I can find one?

    Thanks

    John C
     
    jc@ukzone.com, Mar 23, 2010 IP
  2. skywebsol

    skywebsol Well-Known Member

    Messages:
    161
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #2
    PM me more details i can help you.
     
    skywebsol, Mar 23, 2010 IP
  3. guardian999

    guardian999 Well-Known Member

    Messages:
    376
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #3
    
    <?php
    if(isset($_POST['email'])){
      $email = $_POST['email'];
      mysql_query("INSERT INTO table(email) VALUES ('$email')");
    }
    ?>
    <form method="post">
    <input type="text" name="email">
    <input type="submit" value="Collect">
    </form>
    
    PHP:
     
    guardian999, Mar 23, 2010 IP