Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Form

  1. #1
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Form

    I would like to create a form to sign up for my new website.

    The fields are:

    Username
    Password
    Retype Password
    Email Address
    Date of Birth

    I need the Password to come up as *****.

    I want the form to be sent to my email.

    I dont want the "mailto:user@hotmail.com"

    Thanks
    Simon

  • #2
    Regular Coder
    Join Date
    Mar 2005
    Location
    Brighton, UK
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You don’t really give much away, not entirely sure what you asking for as its not clear what your experience is already. A few resources:

    Creating HTML forms: http://www.w3schools.com/html/html_forms.asp

    You make password boxes using the type="password" attribute of the input tag.

    To send an e-mail using PHP (server side, so no one sees your e-mail address) you can use the mail function: http://uk.php.net/manual/en/function.mail.php

    Here is a tutorial on using mail: http://www.phpnoise.com/tutorials/12/3

    Hope that helps, I can’t really give much more info as I don’t know what you asking, are you actually wanting someone to write a whole script for you? (cause that’s probably not gonna happen)

  • #3
    New Coder
    Join Date
    Feb 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    form.html:

    Code:
    <html>
    <head>
    <title>Register!</title>
    </head>
    <body>
    <form action="process.php" method="POST">
    Username: <input type="text" name="username"><br />
    Password: <input type="password" name="pass"><br />
    E-mail: <input type="text" name="email"><br />
    Date Of Birth: <input type="text" name="dob"><br />
    <input type="submit" value="Go!"> <input type="reset" value="Reset">
    </form>
    </body>
    </html>
    process.php:

    [php]
    <?php
    $un=$_POST["username"];
    $pw=$_POST["pass"];
    $em=$_POST["email"];
    $do=$_POST["dob"];
    $youremail="your@email.com";
    $message=echo (
    "$un<br />$pw<br />$em<br />$do"
    );
    $subject="New User Registration";

    mail($youremail, $subject, $message)
    ?>
    [/code]

    You can try that, but this way is definately not the most efficent way to register users..

  • #4
    Senior Coder
    Join Date
    Nov 2002
    Location
    North-East, UK
    Posts
    1,265
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here is an example of a basic form
    http://www.xentrik.net/php/email.php


  •  

    Posting Permissions

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