Domo
August 30, 2003, 7:02pm
1
Ive made a contact form with one field and I cannot get it to go to the 2nd frame (thank you message) and actually send the form (I have a server side script already).
If someone could take a look at my fla and tell me what I did wrong, it would be greatly appreciated.
heres the fla: http://216.44.5.31/codsig2.fla
Thank you!!
system
August 30, 2003, 7:06pm
2
What code do you have for the script ?
system
August 30, 2003, 7:17pm
3
Not sure if its right… but
<html>
<head>
<title>Contact Form</title>
</head>
<body>
<?php
// define variables
$message = $_POST['message'];
$IP = $_SERVER['REMOTE_ADDR'];
$to = "domo@retty.com";
// set $subject
$subject = "Sent from msg machine";
// set $msg
$msg = "Name: $name
Email: $email
IP: $IP
Message: $message";
// define mail headers
$mailheaders = "From: $name <$email>";
$result = mail($to, $subject, $msg, $mailheaders);
?>
</body>
</html>
system
August 30, 2003, 8:47pm
4
Your PHP script should look like this:
<?php
$message = $_POST['message'];
$IP = $_SERVER['REMOTE_ADDR'];
$to = "domo@retty.com";
$subject = "Sent from msg machine";
$msg = "Name: ".$name."
";
$msg .= "Email: ".$email."
";
$msg .= "IP: ".$IP."
";
$msg .= "Message: ".$message;
// define mail headers
$mailheaders = "From: ".$name." <".$email.">";
mail($to, $subject, $msg, $mailheaders);
?>
I think.
system
August 31, 2003, 2:50pm
5
I think theres something wrong with the fla though… as it will not go to the “message sent” frame.
What do you think?