SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2000
    Location
    Grand Rapids, MI
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm glad I found this forum handling so many languages at once.

    Here is my situation. I have an "under construction" site. I want to collect email addresses from visitors so I can notify them when the site goes live.

    I need a way to have a text box where the visitor can enter their email address, press the submit button, then redirect to another page (confirmation). The email address they entered should either be sent to me in an email, or saved on the site server in a growing text file.

    Any help would be greatly appreciated,

    Mike
    mmccue@post.com

  2. #2
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use what you are probably looking for on www.perth-online.fsnet.co.uk , using tou.com as a cgi provider (you can also use this if you don't have a cgi-bin)

    This is the code I use

    <script language="Javascript">
    <!--
    function validate ()
    {
    if (document.notify.name.value == "") {
    alert("Please enter your name.")
    return false;
    }
    if (document.notify.email.value == "") {
    alert("Please enter an email address.")
    return false;
    }
    return true;
    }
    // -->
    </script>
    <form method="post" target="_top" form name="notify"
    action="http://www.tou.com/cgi-bin/form/form.cgi" onsubmit="return validate()">
    <input type="hidden"
    name="req-user"
    value="ENTER ANY USERNAME HERE">
    <input type="hidden"
    name="req-email"
    value="THE EMAIL ADDRESS YOU WANT THE DATA TO BE SENT TO">
    <input type="hidden"
    name="req-nexturl"
    value="THE CONFIRMATION PAGE">
    <input type="hidden"
    name="opt-subject"
    value="THE NAME OF THE SUBJECT THAT YOU WANT TO APPEAR IN THE EMAIL THAT IS SENT TO YOU WITH THE SUBMITTED DATA">
    <table width="100%" border="0">
    <tr>
    <td width="20%">Name:</td>
    <td width="80%">
    <input type="text" name="name" size="50">
    </td>
    </tr>
    <tr>
    <td width="20%">Email Address:</td>
    <td width="80%">
    <input type="text" name="email" size="50">
    </td>
    </tr>
    <tr>
    <td width="100%" colspan="2">
    <div align="center">
    <input type="submit" name="submit" onclick="validate()" value="Submit">
    <input type="reset" name="reset" value="Reset">
    </div>
    </td>
    </tr>
    </table>
    </form>

    ------------------
    Perth Grammar School Online - www.perth-grammar.pkc.sch.uk


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •