I understand but don't understand how to change it... if I show you the full script do you think you could help me out... PRETTY PLEASE
This is for contact_pre.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<title>ERB Images | Quality British Photography</title>
<link rel="stylesheet" type="text/css" href="base_ff.css" media="screen">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="revisit-after" content="31 Days">
<meta name="expires" content="never">
<meta name="distribution" content="global">
<meta name="robots" content="index,follow">
</head>
<body class="fullpage">
<div class="outer">
<div class="mainbody">
<div class="header_left_home">
<ul id="home">
<li>
<a href="index.php">RETURN HOME</a>
</li>
</ul>
</div>
<div class="section_right">
<ul id="section_contact">
<li>
<span id="section_contact"><a href="http://www.erbimages.com/hire_pre.php">GO BACK</a></span>
</li>
<li>
<span id="section_txt_form">
<form method="post" action="contact.php">
<p>Your Details</p>
<p>
<select name="sendto">
<option value="
[email protected]">Information</option>
<option value="
[email protected]">Hire</option>
<option value="
[email protected]">Royalty Free</option>
<option value="
[email protected]">Technical</option>
</select>
</p>
<p><font color=red>*</font> <font style="padding-right: 2em;">Name:</font><input size=25 name="Name"></p>
<p><font color=red>*</font> <font style="padding-right: 2em;">Email:</font>
<input size=25 name="Email">
</p>
<p><font style="padding-right: 2em;">Company / Event:</font><input size=25 name="Company"></p>
<p>Message</p>
<p><textarea name="Message" rows=5 cols=35></textarea></p>
<p><input type=submit name="send" value="Submit"></p>
</form>
</span>
</li>
</ul>
</div>
</div>
</div>
</body>
</html>
This is for contact.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<title>ERB Images | Quality British Photography</title>
<link rel="stylesheet" type="text/css" href="base_ff.css" media="screen">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="revisit-after" content="31 Days">
<meta name="expires" content="never">
<meta name="distribution" content="global">
<meta name="robots" content="index,follow">
</head>
<body class="fullpage">
<div class="outer">
<div class="mainbody">
<div class="header_left_home">
<ul id="home">
<li>
<a href="index.php">RETURN HOME</a>
</li>
</ul>
</div>
<div class="section_right">
<ul id="section_contact">
<li>
<span id="section_contact"><a href="http://www.erbimages.com/hire_pre.php">GO BACK</a></span>
</li>
<li>
<span id="section_txt">
<?php
$to = $_REQUEST['sendto'] ;
$from = $_REQUEST['Email'] ;
$name = $_REQUEST['Name'] ;
$headers = "From: $from";
$subject = "Web Contact Data";
$fields = array();
$fields{"Name"} = "Name";
$fields{"Company"} = "Company";
$fields{"Email"} = "Email";
$fields{"Message"} = "Message";
$body = "We have received the following information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }
$headers2 = "From:
[email protected]";
$subject2 = "Thank you for contacting us.";
$autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible, usually within 48 hours.";
if($from == '') {print "You have not entered an email, please go back and try again";}
else {
if($name == '') {print "You have not entered a name, please go back and try again";}
else {
$send = mail($to, $subject, $body, $headers);
$send2 = mail($from, $subject2, $autoreply, $headers2);
if($send)
{header( "Location: thankyou.php" );}
else
{print "We encountered an error sending your mail, please notify
[email protected]"; }
}
}
?>
</span>
</li>
</ul>
</div>
</div>
</div>
</body>
</html>