In this php tutorial you will learn how to setup a simple contact form which will be sent then by email. That needs to be done in two sides : html form and php contact form processing.
Html side is right here :
<form action="" method="POST"> Full name : <input type="text" name="fullname"><br/> Email : <input type="text" name="email"><br/> Message : <textarea name="message"></textarea><br/> <input type="submit" name="sb" id="sb" value="Send"> </form>
And here it is the processing side
if(isset($_POST['submit'])) { if($_POST['fullname'] == "" || $_POST['email'] == "" || $_POST['message'] == "") print "Fields are mandatory"; }else{ $to = "youremail"; $from = $_POST['email']; $subject = "contact form"; $message = $_POST['message']; mail($to, $subject, $message); }