shakaku_haru
01-13-2007, 11:52 AM
My form has some problems. When I tried to send a application, it always says that I didn't submit a name. Is there any problems with my coding?
formmail.php coding:
<?php
//variables (change these)
$youremail = "ambracascata@cashette.com";
// your email address
$subject = "Staff Apply";
// the subject of the email
$thankyou = "thanks.php";
// thank you page
// don't change anything else
if($name == ""){
?>
No display name added. Please go back.<br/>
<?php
}elseif($email == ""){
?>
No email added. Please go back.<br/>
<?php
}elseif($position == ""){
?>
No position chosen. Please go back.<br/>
<?php
}else{
$msg = ereg_replace("\\\'", "'", $message);
$msg = ereg_replace('\\\"', "\"", $msg);
$message1 = "from: $name\nemail: $email\nmessage:\n$msg1";
mail($youremail, $subject, $msg, "From: $email\r\nReply-to: $email\r\n");
?>
<meta http-equiv="refresh" content="0; url=<?echo $thankyou;?>"">
<?php
}
?>
formmail.php coding:
<?php
//variables (change these)
$youremail = "ambracascata@cashette.com";
// your email address
$subject = "Staff Apply";
// the subject of the email
$thankyou = "thanks.php";
// thank you page
// don't change anything else
if($name == ""){
?>
No display name added. Please go back.<br/>
<?php
}elseif($email == ""){
?>
No email added. Please go back.<br/>
<?php
}elseif($position == ""){
?>
No position chosen. Please go back.<br/>
<?php
}else{
$msg = ereg_replace("\\\'", "'", $message);
$msg = ereg_replace('\\\"', "\"", $msg);
$message1 = "from: $name\nemail: $email\nmessage:\n$msg1";
mail($youremail, $subject, $msg, "From: $email\r\nReply-to: $email\r\n");
?>
<meta http-equiv="refresh" content="0; url=<?echo $thankyou;?>"">
<?php
}
?>