PDA

View Full Version : Can some one help me edit this request form?



Matt.
20-09-2005, 03:25 PM
Can some one help me edit this request form? I have this request form but every time I try to edit it and then try testing it out it just comes up with an error message. The reqeust php code i have at the moment is
<?php
if(isset($_POST["send"])){
$name = $_POST["name"];
$email = $_POST["email"];
$subject = $_POST["subject"];
$msg = $_POST["msg"];
$receiver = "my email address";
if(empty($name)){
echo("-There was no name!<br />");
}
if(empty($email)){
echo("-The email was empty or invalid!<br />");
}
if(empty($subject)){
echo("-There was no subject!<br />");
}
if(empty($msg)){
echo("-There was no message!<br />");
}
if(!empty($name) && !empty($email) && !empty($subject) &&
!empty($msg)){
$headers = "MIME-Version: 1.0";
$headers .= "Content-type: text/html; charset=iso-8859-1";
$headers .= "From: ".$email."";

$messageproper =

"------------------------- Email -------------------------\n\n" .
"Name: $name\n" .
"Email: $email\n" .
"Message: $msg\n" .

"\n------------------------------------------------------------\n" ;

mail("$receiver", $subject, $messageproper, "From: \"$name\"
<$email>\nReply-To: \"$name\" <$email>\nX-Mailer: chfeedback.php 2.02"
);
echo( "Thank you <b>$name</b>, your email was sent!" );
}
}
?>
</font>
<form method='post'>
Name:<br />
<input type='text' name='name' size='35'><br />
E-mail:<br />
<input type='text' name='email' size='35'><br />
Subject:<br />
<input type='text' name='subject' size='35'><br />
Message:<br />
<textarea name='msg' rows='8' cols='42'></textarea><br />
<input type='submit' name='send' value='Send Email'> <input type='reset' value='Reset'>
</form>

that works fine but I just can't edit it to how I want it. I want three things on there, 1. A name box 2. A drop down menu 3. A message box.
If some one could show me how to do this I would be very grateful,
Many thanks, Matty

мϊкэ
20-09-2005, 05:57 PM
Sorry wrong thread :@

Want to hide these adverts? Register an account for free!