Sending an email using PHP script is very easy simply using mail function you can send mail(except you need to send attachments...you have to use mime_mail class or some other availbale on most of the sites).
You might know that in PHP you can get the data submited by a form simply assigning "$" symbol to the field name in that form.
By assuming that you named To,From,Subject,Message fields in the form as to,from,subject,message resp.
the mail function would be
mail($to,$subject,$message,"From:".$from);
I hope you prefer to check the emptyness of the fields client side.
If you don't want to give from field in the form then you need to set it before sending the mail.
If you are submiting the from to "send.mail.php" then the script in that file looks like this
<?php
if(!$from)
{
// change the name and address
$from="\"Ajay Kumar\"<ajay@appliednewmedia.com>";
}
$mr=@mail($to,$subject,$message,"From:".$from);
// redirect to the page you wish
header("Location: confirm.html");
?>
Hope this helps