-
Contact Form Coding Help
Hi So I have a website: www.Imicallef.com and I tried adding a contact form to it. I make 4 input boxes and gave them the instance names: name, subject, message, and email. The I made a send button with the code:
on (release) {
if (name eq "" or subject eq "" or message eq "" or email eq "") {
stop();
} else {
loadVariablesNum("form.php", 0, "POST");
_root.sent.gotoAndPlay(2);
_root.box.gotoAndStop(1);
}
}
on (keypress "<Tab>") {
stop();
}
Then I have a clear form button with the code:
on (release) {
name = "";
subject="";
message="";
email="";
}
Then I created a file in Dreamweaver in the same folder named form.php with the code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>form.php</title>
</head>
<body>
$to = "micali@rpi.edu";
$msg = "$name\n\n";
$msg .= "$message\n\n";
mail($to, $subject, $msg, "Message From: Online client\nReply-To: $email\n");
?>
</body>
</html>
It all works except for two problems. The clear form button doesn't clear the form. But the bigger problem is that I don't get any emails from the contact form. Why am I not being sent the emails? And why isn't the clear button workin?
-
PHP Code:
<?php $to = "micali@rpi.edu"; $msg = "$name\n\n"; $msg .= "$message\n\n";
mail($to, $subject, $msg, "Message From: Online client\nReply-To: $email\n"); ?>
this only should be your form.php. No doctype or other html tags.
gparis
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|