Contact Form, what am I doing wrong?

Hi, I’m making a contact form on my site that I am building, I have never made a contact form before. So, I went around and looked at some tutorials, I have all the inputs text boxes; (name, subject, message, e-mail, etc.) and i have a send and clear buttons. On my send button i have,

on (release) {
if (name eq “” or subject eq “” or message eq “” or email eq “”) {
} else {
loadVariablesNum(“form.php”, 0, “POST”);
gotoAndStop (2);

And the php file looks like this…


 $to = "[email protected]";
 $msg = "$name

$msg .= "$message


mail($to, $subject, $msg, "From: My web site
Reply-To: $email


Ok, so where I have my email in the php file, is that where it is suppose to go so that when someone contacts me the message goes to that email?