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 14 of 14
  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    need help with html forms

    Hey guys, im hoping some of you can help me. I need to create a website, which ive done kind of lol and I need to include a page where people can make bookings online.

    I just cant seem do it right. Its really difficult for me because im not allowed to use dreamweaver or anything, it all has to be done in notepad and im really struggling with this. It just basically needs to have:

    First name:
    Last name:
    Address:
    How many people: (drop down list)
    Contact number:
    Where did you hear about us?: (with some radio buttons)

    I am over the age of 18: (checkbox)

    Submit button that actually sends an email to my email adress. I have tried and tried and theres not even any decent guides to follow.

    It isnt allowed to contain any other languages apart from html.

    Please someone help me! It needs to be in my monday please....

  • #2
    Regular Coder
    Join Date
    Oct 2010
    Location
    Florence, MS
    Posts
    484
    Thanks
    10
    Thanked 33 Times in 32 Posts
    I will do this for a small fee.. but you're not getting this done for free..

  • #3
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Im broke lol isnt there anyone that can quickly whip me something up? It doesnt have to have any color or be fancy or anything... just a simple form please im really desperate!

  • #4
    BAW
    BAW is offline
    New to the CF scene
    Join Date
    Nov 2010
    Location
    Slough, UK
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post
    Here, take a look on this site, they have a bit on forms in HTML - http://www.htmldog.com

    Main pages urll want to see - http://www.htmldog.com/guides/htmlbeginner/forms/ & http://www.htmldog.com/guides/htmladvanced/forms/

  • Users who have thanked BAW for this post:

    htmlnoob1 (11-07-2010)

  • #5
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by BAW View Post
    Here, take a look on this site, they have a bit on forms in HTML - http://www.htmldog.com

    Main pages urll want to see - http://www.htmldog.com/guides/htmlbeginner/forms/ & http://www.htmldog.com/guides/htmladvanced/forms/
    Dude thank you so much you are a life saver! I just need to make the submit button actually send the information I input to my email address then im all done. How would I go about doing that? Here is what I have so far.

    Code:
    <form action="booking.php" method="post">
    
    	<p><font size="3">Please fill in the booking form below. Fields with an astrix are mandatory.</p>
    	<p>First name:</p>
    	<p><input type="text" name="name" value="" /></p>
    	<p>Last Name:</P>
    	<p><input type="text" Last name="name" value="" /></p>
    	<p>Full address including post code:</p>
    	<p><input type="text"" value="" /></p>
    	<p><input type="text"" value="" /></p>
    	<p><input type="text"" value="" /></p>
    	<p><input type="text"" value="" /></p>
    
    
    	<p>Where did you hear about us:</p>
    	<p><input type="radio" name="where" value="Barking & Dagenham Post" checked="checked" /> Barking & Dagenham Post</p>
    	<p><input type="radio" name="where" value="Google" /> Google</p>
    	<p><input type="radio" name="where" value="Leaflet" /> Leaflet</p>
    	<p><input type="radio" name="where" value="Friends" /> Friends</p>
    	<p><input type="radio" name="where" value="Television" /> Television</p>
    	<p><input type="radio" name="where" value="Other" /> Other (please specify)</p>
    
    	<p>If you selected other, please tell us where you heard about us: </p>
    	<p><textarea name="comments" rows="5" cols="40"></textarea></p>
    	<br />
    	<br />	
    	<br />
    	<p><input type="checkbox" name="yesorno" value="terms and conditions" /> Do you accept our terms and conditions?</p>
    
    	<p><input type="submit" /></p>
    
    	<p><input type="reset" /></p>
    
    </form>

  • #6
    BAW
    BAW is offline
    New to the CF scene
    Join Date
    Nov 2010
    Location
    Slough, UK
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by htmlnoob1 View Post
    Dude thank you so much you are a life saver! I just need to make the submit button actually send the information I input to my email address then im all done. How would I go about doing that? Here is what I have so far.

    Code:
    <form action="booking.php" method="post">
    
    	<p><font size="3">Please fill in the booking form below. Fields with an astrix are mandatory.</p>
    	<p>First name:</p>
    	<p><input type="text" name="name" value="" /></p>
    	<p>Last Name:</P>
    	<p><input type="text" Last name="name" value="" /></p>
    	<p>Full address including post code:</p>
    	<p><input type="text"" value="" /></p>
    	<p><input type="text"" value="" /></p>
    	<p><input type="text"" value="" /></p>
    	<p><input type="text"" value="" /></p>
    
    
    	<p>Where did you hear about us:</p>
    	<p><input type="radio" name="where" value="Barking & Dagenham Post" checked="checked" /> Barking & Dagenham Post</p>
    	<p><input type="radio" name="where" value="Google" /> Google</p>
    	<p><input type="radio" name="where" value="Leaflet" /> Leaflet</p>
    	<p><input type="radio" name="where" value="Friends" /> Friends</p>
    	<p><input type="radio" name="where" value="Television" /> Television</p>
    	<p><input type="radio" name="where" value="Other" /> Other (please specify)</p>
    
    	<p>If you selected other, please tell us where you heard about us: </p>
    	<p><textarea name="comments" rows="5" cols="40"></textarea></p>
    	<br />
    	<br />	
    	<br />
    	<p><input type="checkbox" name="yesorno" value="terms and conditions" /> Do you accept our terms and conditions?</p>
    
    	<p><input type="submit" /></p>
    
    	<p><input type="reset" /></p>
    
    </form>
    I believe you would change the
    Code:
    form action="booking.php"
    to something else, let me have a look.


    *EDIT* you need to put
    Code:
    <form action="mailto:youremail@email.com" method="post">
    Let me know how it goes!!
    Last edited by BAW; 11-07-2010 at 04:16 PM.

  • #7
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Slight problem, when I click the submit button it opens up outlook rather then just sends it to my email... hmm ill have a look into it. Thanks very much for your help so far!

  • #8
    BAW
    BAW is offline
    New to the CF scene
    Join Date
    Nov 2010
    Location
    Slough, UK
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by htmlnoob1 View Post
    Slight problem, when I click the submit button it opens up outlook rather then just sends it to my email... hmm ill have a look into it. Thanks very much for your help so far!
    Code:
    <script language="php">
    $email = $HTTP_POST_VARS[email];
    $mailto = "email@address";
    $mailsubj = "Form submission";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "Values submitted from web site form:\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
    if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
    </script>
    That is PHP but I believe you can include it in the HTML doc! (you need to change email@address to ur email addy)
    This code needs to go to booking.php after u submit so change the form action back!

    Code:
    <form action="booking.php" method="post">

  • #9
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks alot man I really apprciated the help. I just emailed my tutor and he said what I have already is fine. Including the php script would count as a fail. For one we havent learnt html so he would know I just copied it. Secondly we are being marked for our html code.

    He said its fine aslong as it works.. which it does. Thanks very much mate!

  • #10
    BAW
    BAW is offline
    New to the CF scene
    Join Date
    Nov 2010
    Location
    Slough, UK
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post
    No probs mate!

  • #11
    New Coder
    Join Date
    Nov 2010
    Posts
    27
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Im interested in getting the 'Submit' button to send an email to me or save somehow. How can I do this? Anytime I try I get the same problem with Outlook opening up. I just want the user to go on to my site, input all the details, click submit, shown a 'Thanks' page then the information is sent to me somehow.

    How could I do this?

  • #12
    BAW
    BAW is offline
    New to the CF scene
    Join Date
    Nov 2010
    Location
    Slough, UK
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by davm22 View Post
    Im interested in getting the 'Submit' button to send an email to me or save somehow. How can I do this? Anytime I try I get the same problem with Outlook opening up. I just want the user to go on to my site, input all the details, click submit, shown a 'Thanks' page then the information is sent to me somehow.

    How could I do this?

    Right, you need to create your form, for example -

    Code:
    <form action="thanks.php" method="post">
    
    	<p><font size="3">Please fill in the booking form below. Fields with an astrix are mandatory.</p>
    	<p>First name:</p>
    	<p><input type="text" name="name" value="" /></p>
    	<p>Last Name:</P>
    	<p><input type="text" Last name="name" value="" /></p>
    	<p>Full address including post code:</p>
    	<p><input type="text"" value="" /></p>
    	<p><input type="text"" value="" /></p>
    	<p><input type="text"" value="" /></p>
    	<p><input type="text"" value="" /></p>
    
    
    	<p>Where did you hear about us:</p>
    	<p><input type="radio" name="where" value="Barking & Dagenham Post" checked="checked" /> Barking & Dagenham Post</p>
    	<p><input type="radio" name="where" value="Google" /> Google</p>
    	<p><input type="radio" name="where" value="Leaflet" /> Leaflet</p>
    	<p><input type="radio" name="where" value="Friends" /> Friends</p>
    	<p><input type="radio" name="where" value="Television" /> Television</p>
    	<p><input type="radio" name="where" value="Other" /> Other (please specify)</p>
    
    	<p>If you selected other, please tell us where you heard about us: </p>
    	<p><textarea name="comments" rows="5" cols="40"></textarea></p>
    	<br />
    	<br />	
    	<br />
    	<p><input type="checkbox" name="yesorno" value="terms and conditions" /> Do you accept our terms and conditions?</p>
    
    	<p><input type="submit" name="Submit" value="Send" /></p>
    
    	<p><input type="reset" /></p>
    
    </form>
    Then u need a page that relates to the "thanks.php"

    that cotains this -
    Code:
    <script language="php">
    $email = $HTTP_POST_VARS[email];
    $mailto = "PUT UR EMAIL ADDY HERE!!";
    $mailsubj = "Form submission";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "Values submitted from web site form:\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
    if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
    </script>

    Give that a shot!

  • #13
    New Coder
    Join Date
    Nov 2010
    Posts
    27
    Thanks
    4
    Thanked 0 Times in 0 Posts
    New Thread Started
    Last edited by davm22; 11-07-2010 at 11:01 PM.

  • #14
    BAW
    BAW is offline
    New to the CF scene
    Join Date
    Nov 2010
    Location
    Slough, UK
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hi,

    I have looked into this, and im affraid I cannot help u any further. I will be looking into this more coz im interested now BUT im sure there is someone else who can help out here!


  •  

    Posting Permissions

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