Click to See Complete Forum and Search --> : simple form for a complete beginner


pixeler
04-11-2006, 10:08 AM
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

<Eddie>
04-11-2006, 10:14 AM
What is the platform of your web host as this dictates which type of script to use?

Linux hosting or Windows?

pixeler
04-11-2006, 10:21 AM
its Linux !
anything else you need to know?

<Eddie>
04-11-2006, 10:24 AM
There's a really good starter tutorial here (http://www.christian-web-masters.com/articles/web_php-mail-form-2.html) that will do what you need.

pixeler
04-11-2006, 10:31 AM
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...?

<Eddie>
04-11-2006, 10:38 AM
As always, Windows makes it a bit harder due to the infrastructure of the server environment but here (http://www.codeproject.com/asp/sendmail.asp) is a useful article.

mark200
04-11-2006, 07:01 PM
Hey,
I'm not sure if you still need help, but this (http://www.scriptarchive.com/readme/formmail.html) script is really good. It more or less explains itself, it's what i use on my contact us (www.webtechdublin.com/contact_us) page of my site.

pixeler
04-12-2006, 07:53 PM
There's a really good starter tutorial here (http://www.christian-web-masters.com/articles/web_php-mail-form-2.html) 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

mark200
04-13-2006, 06:15 AM
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.

pixeler
04-13-2006, 06:19 AM
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)

<Eddie>
04-13-2006, 06:35 AM
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.


header("location:form.php");

should be...


header("location:thankyou.php");

mark200
04-13-2006, 06:35 AM
woops....someone get there before me :p

pixeler
04-13-2006, 06:46 AM
perfect ! thanks !
do you know of any tutorials that woudl guide me towards validating the info?