form processing PHP

He has: 83 posts

Joined: Feb 2005

Im looking for a site that has a tutorial on how to set up a contact form using php.

Anyone know of a site with a good tut on it?

They have: 14 posts

Joined: Dec 2005

if you know how to make forms in html, it's easy to use the php mail function to mail the form.

just create your form in the html, and have it call mailer.php or whatever. in mailer.php, compose your message body in a variable, something like:

$body = "name: $name \n\n message: $message"; etc, then just mail() it to yourself!

He has: 176 posts

Joined: Oct 1999

I'd suggest using phpMailer. There's a first time user tutorial. There's also a tutorial for it on phpFreaks.

They have: 8 posts

Joined: Dec 2005

pick up form variables using $_POST global, then just populate $subject, $from, $to, and $body, and use mail() function to send out email... or look for form2mail tutorials on HotScripts Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.