www.webdeveloper.com
Results 1 to 13 of 13

Thread: simple form for a complete beginner

  1. #1
    Join Date
    Apr 2006
    Posts
    6

    Wink simple form for a complete beginner

    I need to add a simple form to my site, one that allows visitors to input their name, email, tel and comments. When they hit submit it should get sent to me. It needs to be secure. It would be nice if it validated the info before submit but this is not absoutly necesary.

    I am completely new to this kind of thing and Im finding a lot of examples out there that I just cant follow or I cant get them working. Can anyone direct me a working, secure good example of this kind of thing ?

    many thanks

    pixeler

  2. #2
    Join Date
    Apr 2005
    Location
    Hastings, Sussex, UK.
    Posts
    244
    What is the platform of your web host as this dictates which type of script to use?

    Linux hosting or Windows?

  3. #3
    Join Date
    Apr 2006
    Posts
    6
    its Linux !
    anything else you need to know?

  4. #4
    Join Date
    Apr 2005
    Location
    Hastings, Sussex, UK.
    Posts
    244
    There's a really good starter tutorial here that will do what you need.

  5. #5
    Join Date
    Apr 2006
    Posts
    6
    cool, thanks for that.
    can you direct me to one for a windows paltform, as I will probably need to create a form for that environment soon as well...?

  6. #6
    Join Date
    Apr 2005
    Location
    Hastings, Sussex, UK.
    Posts
    244
    As always, Windows makes it a bit harder due to the infrastructure of the server environment but here is a useful article.

  7. #7
    Join Date
    Apr 2006
    Posts
    74
    Hey,
    I'm not sure if you still need help, but this script is really good. It more or less explains itself, it's what i use on my contact us page of my site.

  8. #8
    Join Date
    Apr 2006
    Posts
    6

    Red face

    Quote Originally Posted by <Eddie>
    There's a really good starter tutorial here that will do what you need.

    Thanks Eddie, I tested it on the server and it works a treat!
    I would however like to extend it so that it updates the page with some text like " your message has been sent" as right now it looks like nothing happens to the end user.

    do you know any links to PHP resources/tutorials that I can add in to achieve this kind of thing?

    Also, links to tutorial / code on validating the info sent?

    thanks

    P

  9. #9
    Join Date
    Apr 2006
    Posts
    74
    Quote Originally Posted by pixeler
    Thanks Eddie, I tested it on the server and it works a treat!
    I would however like to extend it so that it updates the page with some text like " your message has been sent" as right now it looks like nothing happens to the end user.
    I'm not sure if that script allows you to do this, but i put a redirect in for mine, so that when the person presses submit, and the form sens to my email, it redirects to a new page. So i just made a new page, with the text "thanks, your message has been sent..........". Its a really simple solution, but works perfectly.

  10. #10
    Join Date
    Apr 2006
    Posts
    6
    that sounds perfect - but how did you do that? ( sorry if that is an obvious question but I am still very new to all this kind of thing)

  11. #11
    Join Date
    Apr 2005
    Location
    Hastings, Sussex, UK.
    Posts
    244
    In terms of the link I provided earlier, if you wish to redirect to a thank you page then the following piece of code needs to be changed.

    Code:
    header("location:form.php");
    should be...

    Code:
    header("location:thankyou.php");

  12. #12
    Join Date
    Apr 2006
    Posts
    74
    woops....someone get there before me
    Last edited by mark200; 04-13-2006 at 05:37 AM. Reason: Too Late

  13. #13
    Join Date
    Apr 2006
    Posts
    6
    perfect ! thanks !
    do you know of any tutorials that woudl guide me towards validating the info?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles