Hi,
I did a script a while ago which was secure enough for the web but I lost it. Now looking on the web all I can find is half hearted tutorials which are not much use to me
I have the HTML form sorted on my contact page, and I have the beginning of the PHP mail to script sorted but am abit stuck.
This is what I have so far..
For some reason I cant for the love of life think how to do all the error checking, spam protection and actually "Sending" the mail.
Would like some links to some good tutotrials if possible as google is failing me
I dont want nothing which sticks fort knocks infront of my script, but something secure.
Thanks all
I did a script a while ago which was secure enough for the web but I lost it. Now looking on the web all I can find is half hearted tutorials which are not much use to me

I have the HTML form sorted on my contact page, and I have the beginning of the PHP mail to script sorted but am abit stuck.
This is what I have so far..
Code:
<?php
//Variable declarations
$name = strip_tags($_POST['name']);
$email = strip_tags($_POST['email']);
$comments = strip_tags($_POST['comments']);
$errors = array(); // array of errors
// basic validation (if empty)
if ($name == '') {
$errors[] = "\n\n - Please enter your name. ";
}
if ($email == '') {
$errors[] = "\n\n - Please enter your e-mail. ";
}
if ($comments == '') {
$errors[] = "\n\n - Please enter your comments. ";
}
//Script to send e-mail
For some reason I cant for the love of life think how to do all the error checking, spam protection and actually "Sending" the mail.
Would like some links to some good tutotrials if possible as google is failing me

I dont want nothing which sticks fort knocks infront of my script, but something secure.
Thanks all
