I have built a basic form in Dreamweaver (full code below) and i need the form details (once filled out) to be sent to a specified email address, the host server i use is 000webhost and they support PHP so no problems there. But, i am having majour problems writing the code as i don't have much knowledge of PHP, only HTML and CSS.
I've looked online and have found some generic PHP form code but none of them work (even after making the relevant changes). I did notice that all the 'borrowed' PHP scripts were working fine with a form that was written in HTML as opposed to one built in Dreamweaver.
Can anyone give me an insight to writing the correct code, the code i have tried so far is:
$name = $_REQUEST['name'];
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "firstname.lastname@example.org", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.example.com/thankyou.html" );
But it does nothing. Also could someone explain the Name and ID pop up that comes up when creating a form in Dreaweaver, is it essential to fill out both fields?
Many thanks and my HTML form code is below!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<form id="form1" name="form1" method="post" action="">
<input type="text" name="Name" id="Name" />
<input type="text" name="Email" id="Email" />
<textarea name="Message" id="Message" cols="45" rows="5"></textarea>
<input type="submit" name="Sumbit" id="Sumbit" value="Submit" />