What is wrong with this code?
Here is the first page of the code:
<strong>Contact Form</strong><form name="form1" method="post" action="sendcontact.php">Subject:<input name="subject" type="text" id="subject" size="50">Detail:<textarea name="detail" cols="50" rows="4" id="detail"> </textarea>Name:<input name="name" type="text" id="name" size="50">Email:<input name="email" type="text" id="email" size="50"><input type="submit" name="Submit" value="Submit"><input type="reset" name="Submit2" value="Reset">
Here is the sendcontact.php page:
<?php $subject =$subject;$message =$detail;$mail_form =$email;$header ="from: $name<$mail_from>";mail("email@email.com",$subject,$message,$header);?>
To retrieve variables submitted from a POST form you must get their values from the
$_POSTarray.This should accomplish what you are after: