raw_enha
asked on
PHP Coding
hi,
Well Im creating service request and contact us page that once you input the required information you can confirm that it is correct and then it'll send you to a different page that states "your message has been received" . Unfortunately the message "your message has been received " is shown on the confirmation page... this is the coding:
<div id="content" style="width: 942px; height: 887px">
<div align="center">
<div align="right"><html>
<title></title>
<body>
<?php
if (isset($_POST["confirm"]) && $_POST["confirm"] != "")
{
$msg = "First Name: ".$_POST["FirstName"]."\n" ;
$msg .= "Last Name: ".$_POST["LastName"]."\n";
$msg .= "Address: ".$_POST["Address"]."\n";
$msg .= "Address2: ".$_POST["Address2"]."\n";
$msg .= "City:".$_POST["City"]."\n ";
$msg .= "State:".$_POST["State"]." \n";
$msg .= "Zip Code:".$_POST["PostCode"]. "\n";
$msg .= "Telephone:".$_POST["Tel"] ."\n";
$msg .= "Work Tel:".$_POST["WorkTel"]."\ n";
$msg .= "Mobile:".$_POST["Mobile"] ."\n";
$msg .= "Fax:".$_POST["Fax"]."\n";
$msg .= "Company Name:".$_POST["Company2"]. "\n";
$msg .= "Type of Service:".$_POST["company2 "]."\n";
$recipient = "sales@andrewsxray.com";
$subject = "Service Request";
$mailheaders = "From:".$_POST["email"]."\ n";
$mailheaders .= "Reply-To:".$_POST["email" ]."\n\n";
if(mail($recipient, $subject, $msg, $mailheaders))
echo "<b> <center>Your request has been sent successfully!</center> </b>";
else
echo "<b> Error in sending mail to ".$recipient."! </b>";
}
else
{
// validation
$validationOK=true;
if (Trim($FirstName)=="") $validationOK=false;
if (Trim($LastName)=="") $validationOK=false;
if (Trim($Address)=="") $validationOK=false;
if (Trim($City)=="") $validationOK=false;
if (Trim($State)=="") $validationOK=false;
if (!is_numeric($Tel)) $validationOK=false;
if (Trim($company2)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=Confirmati onno.htm\" >";
exit;
}
}
?>
<h2 align="center"><br />
Thank you for filling out the service request...Please confirm your request!</h2>
<form method="post" action="">
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<p align="justify"><strong>Fi rst Name:</strong> <?php echo $_POST['FirstName']; ?> </p>
<p align="justify"><strong>La st Name:</strong> <?php echo $_POST['LastName']; ?> </p>
<p align="justify"><strong>Ad dress:</st rong> <?php echo $_POST['Address']; ?> </p>
<p align="justify"><strong>Ad dress2:</s trong> <?php echo $_POST['Address2']; ?> </p>
<p align="justify"><strong>Ci ty:</stron g> <?php echo $_POST['City']; ?> </p>
<p align="justify"><strong>St ate:</stro ng> <?php echo $_POST['State']; ?> </p>
<p align="justify"><strong>Zi p Code:</strong> <?php echo $_POST['PostCode']; ?> </p>
<p align="justify"><strong>Te l:</strong > <?php echo $_POST['Tel']; ?> </p>
<p align="justify"><strong>Wo rk Tel:</strong> <?php echo $_POST['WorkTel']; ?> </p>
<p align="justify"><strong>Mo bile:</str ong> <?php echo $_POST['Mobile']; ?> </p>
<p align="justify"><strong>Fa x:</strong > <?php echo $_POST['Fax']; ?> </p>
<p align="justify"><strong>Co mpany Name:</strong> <?php echo $_POST['Company2']; ?> </p>
<p align="justify"><strong>Se rvice Type:</strong> <?php echo $_POST['company2']; ?> </p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<input type="hidden" name="FirstName" value="<?php echo $_POST['FirstName']; ?>" >
<input type="hidden" name="LastName" value="<?php echo $_POST['LastName']; ?>" >
<input type="hidden" name="Address" value="<?php echo $_POST['Address']; ?>" >
<input type="hidden" name="Address2" value="<?php echo $_POST['Address2']; ?>" >
<input type="hidden" name="City" value="<?php echo $_POST['City']; ?>" >
<input type="hidden" name="State" value="<?php echo $_POST['State']; ?>" >
<input type="hidden" name="PostCode" value="<?php echo $_POST['PostCode']; ?>" >
<input type="hidden" name="Tel" value="<?php echo $_POST['Tel']; ?>" >
<input type="hidden" name="WorkTel" value="<?php echo $_POST['WorkTel']; ?>" >
<input type="hidden" name="Mobile" value="<?php echo $_POST['Mobile']; ?>" >
<input type="hidden" name="Fax" value="<?php echo $_POST['Fax']; ?>" >
<input type="hidden" name="Company2" value="<?php echo $_POST['Company2']; ?>" >
<input type="hidden" name="company2" value="<?php echo $_POST['company2']; ?>" >
<p><form>
<center>
<input type=button value="Back"
onCLick="history.back()">
<input type="submit" name="confirm" value="Confirm Request" />
<?php
{
}
?>
</p>
</center>
</form>
How do I get the :
if(mail($recipient, $subject, $msg, $mailheaders))
echo "<b> <center>Your request has been sent successfully!</center> </b>";
else
to show up on a separate page..?
Well Im creating service request and contact us page that once you input the required information you can confirm that it is correct and then it'll send you to a different page that states "your message has been received" . Unfortunately the message "your message has been received " is shown on the confirmation page... this is the coding:
<div id="content" style="width: 942px; height: 887px">
<div align="center">
<div align="right"><html>
<title></title>
<body>
<?php
if (isset($_POST["confirm"]) && $_POST["confirm"] != "")
{
$msg = "First Name: ".$_POST["FirstName"]."\n"
$msg .= "Last Name: ".$_POST["LastName"]."\n";
$msg .= "Address: ".$_POST["Address"]."\n";
$msg .= "Address2: ".$_POST["Address2"]."\n";
$msg .= "City:".$_POST["City"]."\n
$msg .= "State:".$_POST["State"]."
$msg .= "Zip Code:".$_POST["PostCode"].
$msg .= "Telephone:".$_POST["Tel"]
$msg .= "Work Tel:".$_POST["WorkTel"]."\
$msg .= "Mobile:".$_POST["Mobile"]
$msg .= "Fax:".$_POST["Fax"]."\n";
$msg .= "Company Name:".$_POST["Company2"].
$msg .= "Type of Service:".$_POST["company2
$recipient = "sales@andrewsxray.com";
$subject = "Service Request";
$mailheaders = "From:".$_POST["email"]."\
$mailheaders .= "Reply-To:".$_POST["email"
if(mail($recipient, $subject, $msg, $mailheaders))
echo "<b> <center>Your request has been sent successfully!</center> </b>";
else
echo "<b> Error in sending mail to ".$recipient."! </b>";
}
else
{
// validation
$validationOK=true;
if (Trim($FirstName)=="") $validationOK=false;
if (Trim($LastName)=="") $validationOK=false;
if (Trim($Address)=="") $validationOK=false;
if (Trim($City)=="") $validationOK=false;
if (Trim($State)=="") $validationOK=false;
if (!is_numeric($Tel)) $validationOK=false;
if (Trim($company2)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=Confirmati
exit;
}
}
?>
<h2 align="center"><br />
Thank you for filling out the service request...Please confirm your request!</h2>
<form method="post" action="">
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<p align="justify"><strong>Fi
<p align="justify"><strong>La
<p align="justify"><strong>Ad
<p align="justify"><strong>Ad
<p align="justify"><strong>Ci
<p align="justify"><strong>St
<p align="justify"><strong>Zi
<p align="justify"><strong>Te
<p align="justify"><strong>Wo
<p align="justify"><strong>Mo
<p align="justify"><strong>Fa
<p align="justify"><strong>Co
<p align="justify"><strong>Se
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<input type="hidden" name="FirstName" value="<?php echo $_POST['FirstName']; ?>" >
<input type="hidden" name="LastName" value="<?php echo $_POST['LastName']; ?>" >
<input type="hidden" name="Address" value="<?php echo $_POST['Address']; ?>" >
<input type="hidden" name="Address2" value="<?php echo $_POST['Address2']; ?>" >
<input type="hidden" name="City" value="<?php echo $_POST['City']; ?>" >
<input type="hidden" name="State" value="<?php echo $_POST['State']; ?>" >
<input type="hidden" name="PostCode" value="<?php echo $_POST['PostCode']; ?>" >
<input type="hidden" name="Tel" value="<?php echo $_POST['Tel']; ?>" >
<input type="hidden" name="WorkTel" value="<?php echo $_POST['WorkTel']; ?>" >
<input type="hidden" name="Mobile" value="<?php echo $_POST['Mobile']; ?>" >
<input type="hidden" name="Fax" value="<?php echo $_POST['Fax']; ?>" >
<input type="hidden" name="Company2" value="<?php echo $_POST['Company2']; ?>" >
<input type="hidden" name="company2" value="<?php echo $_POST['company2']; ?>" >
<p><form>
<center>
<input type=button value="Back"
onCLick="history.back()">
<input type="submit" name="confirm" value="Confirm Request" />
<?php
{
}
?>
</p>
</center>
</form>
How do I get the :
if(mail($recipient, $subject, $msg, $mailheaders))
echo "<b> <center>Your request has been sent successfully!</center> </b>";
else
to show up on a separate page..?
ASKER
its good... it tells me :
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/psa/home/vhosts /andrewsxr ay.com/htt pdocs/acti onpage4.ph p:10) in /usr/local/psa/home/vhosts /andrewsxr ay.com/htt pdocs/acti onpage4.ph p on line 60
what does that mean?
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/psa/home/vhosts
what does that mean?
ASKER
$recipient = "sales@andrewsxray.com";
$subject = "Service Request";
$mailheaders = "From:".$_POST["email"]."\ n";
$mailheaders .= "Reply-To:".$_POST["email" ]."\n\n";
if(mail($recipient, $subject, $msg, $mailheaders))
header("location: confirm.html");
else
echo "<b> Error in sending mail to ".$recipient."! </b>";
}
else
this is how I inputed it
$subject = "Service Request";
$mailheaders = "From:".$_POST["email"]."\
$mailheaders .= "Reply-To:".$_POST["email"
if(mail($recipient, $subject, $msg, $mailheaders))
header("location: confirm.html");
else
echo "<b> Error in sending mail to ".$recipient."! </b>";
}
else
this is how I inputed it
It means that you are sending output to the page prior to the call of header();
Get rid of any output prior to the call of that function.
Get rid of any output prior to the call of that function.
perhaps get rid of
<div id="content" style="width: 942px; height: 887px">
<div align="center">
<div align="right"><html>
<title></title>
<body>
<div id="content" style="width: 942px; height: 887px">
<div align="center">
<div align="right"><html>
<title></title>
<body>
ASKER
well... after removing the div id coding it still tells me this:
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/psa/home/vhosts /andrewsxr ay.com/htt pdocs/acti onpage4.ph p:10) in /usr/local/psa/home/vhosts /andrewsxr ay.com/htt pdocs/acti onpage4.ph p on line 56
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/psa/home/vhosts
is the code above the entire coding for actionpage4.php ?
At line 10 of actionpage4.php is some output that is interfering with the header() call.
What is at line 10?
At line 10 of actionpage4.php is some output that is interfering with the header() call.
What is at line 10?
ASKER
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
<STYLE TYPE="text/css">
a:link { color: #000000; text-decoration: none }
a:active { color: #000000; text-decoration: none }
a:visited { color: #000033; text-decoration: none }
a:hover { color: green; text-decoration: underline }
</STYLE>
<link rel="shortcut icon" href="images/lettera.ico" />
</head>
<body>
<div id="header" style="width: 877px; height: 91px">
<h1>Andrews X-Ray, Inc.</h1>
<br><br>
<a accesskey="1" href="index1.html">Home</a >
<a accesskey="2" href="xrayproducts.html">P roducts</a >
<a accesskey="3" href="xrayservice.html">Se rvices</a>
<a accesskey="4" href="aboutus.html">About us</a>
<a accesskey="5" href="#">Contact us</a>
<br>
<br>
</div>
<?php
if (isset($_POST["confirm"]) && $_POST["confirm"] != "")
{
$msg = "First Name: ".$_POST["FirstName"]."\n" ;
$msg .= "Last Name: ".$_POST["LastName"]."\n";
$msg .= "Address: ".$_POST["Address"]."\n";
$msg .= "Address2: ".$_POST["Address2"]."\n";
$msg .= "City:".$_POST["City"]."\n ";
$msg .= "State:".$_POST["State"]." \n";
$msg .= "Zip Code:".$_POST["PostCode"]. "\n";
$msg .= "Telephone:".$_POST["Tel"] ."\n";
$msg .= "Work Tel:".$_POST["WorkTel"]."\ n";
$msg .= "Mobile:".$_POST["Mobile"] ."\n";
$msg .= "Fax:".$_POST["Fax"]."\n";
$msg .= "Company Name:".$_POST["Company2"]. "\n";
$msg .= "Type of Service:".$_POST["company2 "]."\n";
$recipient = "sales@andrewsxray.com";
$subject = "Service Request";
$mailheaders = "From:".$_POST["email"]."\ n";
$mailheaders .= "Reply-To:".$_POST["email" ]."\n\n";
if(mail($recipient, $subject, $msg, $mailheaders))
header("location: confirm.html");
else
echo "<b> Error in sending mail to ".$recipient."! </b>";
}
else
{
// validation
$validationOK=true;
if (Trim($FirstName)=="") $validationOK=false;
if (Trim($LastName)=="") $validationOK=false;
if (Trim($Address)=="") $validationOK=false;
if (Trim($City)=="") $validationOK=false;
if (Trim($State)=="") $validationOK=false;
if (!is_numeric($Tel)) $validationOK=false;
if (Trim($company2)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=Confirmati onno.htm\" >";
exit;
}
}
?>
<h2 align="center"><br />
Thank you filling out this service request...Please confirm your request!</h2>
<form method="post" action="">
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<p align="justify"><strong>Fi rst Name:</strong> <?php echo $_POST['FirstName']; ?> </p>
<p align="justify"><strong>La st Name:</strong> <?php echo $_POST['LastName']; ?> </p>
<p align="justify"><strong>Ad dress:</st rong> <?php echo $_POST['Address']; ?> </p>
<p align="justify"><strong>Ad dress2:</s trong> <?php echo $_POST['Address2']; ?> </p>
<p align="justify"><strong>Ci ty:</stron g> <?php echo $_POST['City']; ?> </p>
<p align="justify"><strong>St ate:</stro ng> <?php echo $_POST['State']; ?> </p>
<p align="justify"><strong>Zi p Code:</strong> <?php echo $_POST['PostCode']; ?> </p>
<p align="justify"><strong>Te l:</strong > <?php echo $_POST['Tel']; ?> </p>
<p align="justify"><strong>Wo rk Tel:</strong> <?php echo $_POST['WorkTel']; ?> </p>
<p align="justify"><strong>Mo bile:</str ong> <?php echo $_POST['Mobile']; ?> </p>
<p align="justify"><strong>Fa x:</strong > <?php echo $_POST['Fax']; ?> </p>
<p align="justify"><strong>Co mpany Name:</strong> <?php echo $_POST['Company2']; ?> </p>
<p align="justify"><strong>Se rvice Type:</strong> <?php echo $_POST['company2']; ?> </p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<input type="hidden" name="FirstName" value="<?php echo $_POST['FirstName']; ?>" >
<input type="hidden" name="LastName" value="<?php echo $_POST['LastName']; ?>" >
<input type="hidden" name="Address" value="<?php echo $_POST['Address']; ?>" >
<input type="hidden" name="Address2" value="<?php echo $_POST['Address2']; ?>" >
<input type="hidden" name="City" value="<?php echo $_POST['City']; ?>" >
<input type="hidden" name="State" value="<?php echo $_POST['State']; ?>" >
<input type="hidden" name="PostCode" value="<?php echo $_POST['PostCode']; ?>" >
<input type="hidden" name="Tel" value="<?php echo $_POST['Tel']; ?>" >
<input type="hidden" name="WorkTel" value="<?php echo $_POST['WorkTel']; ?>" >
<input type="hidden" name="Mobile" value="<?php echo $_POST['Mobile']; ?>" >
<input type="hidden" name="Fax" value="<?php echo $_POST['Fax']; ?>" >
<input type="hidden" name="Company2" value="<?php echo $_POST['Company2']; ?>" >
<input type="hidden" name="company2" value="<?php echo $_POST['company2']; ?>" >
<p><form>
<center>
<input type=button value="Back"
onCLick="history.back()">
<input type="submit" name="confirm" value="Confirm Request" />
<?php
{
}
?>
</p>
</center>
</form>
<div id="footer" style="width: 887px; height: 1px">
<p>
<a href="index1.html">
<font size="2" color="#000000">Home</font ></a><font size="2"><font color="#000000">
-
<a href="companyspolicy.html" >Company Policy</a>
-</font><font color="#29424a"> <font color="#29424A">
<a href="xrayproducts.html">
<font color="#000000">Products</ font></a>< /font></fo nt><font color="#000000">
-
</font><font color="#29424a">
<a href="http://www.hudsondigitalsystems.com/">
<font color="#000000">Partners</ font></a>< /font><fon t color="#000000">
- </font><a href="aboutus.html"><font color="#29424a">
<font color="#000000">About Us</font></font></a> <font color="#000000">-
</font></font>
<a href="contactus.html">
<font size="2" color="#000000">Contact
Us</font></a><font size="2" color="#000000">
-
</font>
<font color="#000000" size="2">Sitemap</font></p >
</div>
</body>
</html>
thats the whole coding
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
<STYLE TYPE="text/css">
a:link { color: #000000; text-decoration: none }
a:active { color: #000000; text-decoration: none }
a:visited { color: #000033; text-decoration: none }
a:hover { color: green; text-decoration: underline }
</STYLE>
<link rel="shortcut icon" href="images/lettera.ico" />
</head>
<body>
<div id="header" style="width: 877px; height: 91px">
<h1>Andrews X-Ray, Inc.</h1>
<br><br>
<a accesskey="1" href="index1.html">Home</a
<a accesskey="2" href="xrayproducts.html">P
<a accesskey="3" href="xrayservice.html">Se
<a accesskey="4" href="aboutus.html">About us</a>
<a accesskey="5" href="#">Contact us</a>
<br>
<br>
</div>
<?php
if (isset($_POST["confirm"]) && $_POST["confirm"] != "")
{
$msg = "First Name: ".$_POST["FirstName"]."\n"
$msg .= "Last Name: ".$_POST["LastName"]."\n";
$msg .= "Address: ".$_POST["Address"]."\n";
$msg .= "Address2: ".$_POST["Address2"]."\n";
$msg .= "City:".$_POST["City"]."\n
$msg .= "State:".$_POST["State"]."
$msg .= "Zip Code:".$_POST["PostCode"].
$msg .= "Telephone:".$_POST["Tel"]
$msg .= "Work Tel:".$_POST["WorkTel"]."\
$msg .= "Mobile:".$_POST["Mobile"]
$msg .= "Fax:".$_POST["Fax"]."\n";
$msg .= "Company Name:".$_POST["Company2"].
$msg .= "Type of Service:".$_POST["company2
$recipient = "sales@andrewsxray.com";
$subject = "Service Request";
$mailheaders = "From:".$_POST["email"]."\
$mailheaders .= "Reply-To:".$_POST["email"
if(mail($recipient, $subject, $msg, $mailheaders))
header("location: confirm.html");
else
echo "<b> Error in sending mail to ".$recipient."! </b>";
}
else
{
// validation
$validationOK=true;
if (Trim($FirstName)=="") $validationOK=false;
if (Trim($LastName)=="") $validationOK=false;
if (Trim($Address)=="") $validationOK=false;
if (Trim($City)=="") $validationOK=false;
if (Trim($State)=="") $validationOK=false;
if (!is_numeric($Tel)) $validationOK=false;
if (Trim($company2)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=Confirmati
exit;
}
}
?>
<h2 align="center"><br />
Thank you filling out this service request...Please confirm your request!</h2>
<form method="post" action="">
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<p align="justify"><strong>Fi
<p align="justify"><strong>La
<p align="justify"><strong>Ad
<p align="justify"><strong>Ad
<p align="justify"><strong>Ci
<p align="justify"><strong>St
<p align="justify"><strong>Zi
<p align="justify"><strong>Te
<p align="justify"><strong>Wo
<p align="justify"><strong>Mo
<p align="justify"><strong>Fa
<p align="justify"><strong>Co
<p align="justify"><strong>Se
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<input type="hidden" name="FirstName" value="<?php echo $_POST['FirstName']; ?>" >
<input type="hidden" name="LastName" value="<?php echo $_POST['LastName']; ?>" >
<input type="hidden" name="Address" value="<?php echo $_POST['Address']; ?>" >
<input type="hidden" name="Address2" value="<?php echo $_POST['Address2']; ?>" >
<input type="hidden" name="City" value="<?php echo $_POST['City']; ?>" >
<input type="hidden" name="State" value="<?php echo $_POST['State']; ?>" >
<input type="hidden" name="PostCode" value="<?php echo $_POST['PostCode']; ?>" >
<input type="hidden" name="Tel" value="<?php echo $_POST['Tel']; ?>" >
<input type="hidden" name="WorkTel" value="<?php echo $_POST['WorkTel']; ?>" >
<input type="hidden" name="Mobile" value="<?php echo $_POST['Mobile']; ?>" >
<input type="hidden" name="Fax" value="<?php echo $_POST['Fax']; ?>" >
<input type="hidden" name="Company2" value="<?php echo $_POST['Company2']; ?>" >
<input type="hidden" name="company2" value="<?php echo $_POST['company2']; ?>" >
<p><form>
<center>
<input type=button value="Back"
onCLick="history.back()">
<input type="submit" name="confirm" value="Confirm Request" />
<?php
{
}
?>
</p>
</center>
</form>
<div id="footer" style="width: 887px; height: 1px">
<p>
<a href="index1.html">
<font size="2" color="#000000">Home</font
-
<a href="companyspolicy.html"
-</font><font color="#29424a"> <font color="#29424A">
<a href="xrayproducts.html">
<font color="#000000">Products</
-
</font><font color="#29424a">
<a href="http://www.hudsondigitalsystems.com/">
<font color="#000000">Partners</
- </font><a href="aboutus.html"><font color="#29424a">
<font color="#000000">About Us</font></font></a> <font color="#000000">-
</font></font>
<a href="contactus.html">
<font size="2" color="#000000">Contact
Us</font></a><font size="2" color="#000000">
-
</font>
<font color="#000000" size="2">Sitemap</font></p
</div>
</body>
</html>
thats the whole coding
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
cant I just modify the confirm button to generate the new page (confim.html) instead of changing anything else?
Negative - you would need to change the action of the Form to a new page. PHP is finicky about the header() function when HTML or php echo() has been previously output to the screen prior to it.
The other thing you COULD do is move the whole IF block (if isset($_POST["confirm"]) etc....
to the VERY TOP of the page - prior to any HTML output
The other thing you COULD do is move the whole IF block (if isset($_POST["confirm"]) etc....
to the VERY TOP of the page - prior to any HTML output
ASKER
hi, well I'm still having my little issue for the confirmation page. I just need to get the page to generate the message "thankyou for your request it's been successfully sent" on another page.
Have you changed anything per the suggestions?
ASKER
yeah I did richswyatt, but the problem is that I dont want to use javascript and that the "header" function is not working.
Yes - because you have some output prior to the header() function.
Strip out the $_POST handling from the current page - set the form to POST to a new PHP where you will handle the IF block and then have the header in the if block on the new page. This will ensure that there is NO output prior to the header() function.
<?php
if() with the header() function
?>
Strip out the $_POST handling from the current page - set the form to POST to a new PHP where you will handle the IF block and then have the header in the if block on the new page. This will ensure that there is NO output prior to the header() function.
<?php
if() with the header() function
?>
ASKER
Its not functioning.. do you any good websites that can give you coding for forms and their confirmation page? maybe I just need to work with a new form.... this one is giving me trouble anyways.
ASKER
Oh yes ! I figured it out...
Alright - what was the problem?
ASKER
all I did was add this:
<form method="post" action= "confirm.html"> (Confirm.htmL to the form property. )
thankx for all you help though.
<form method="post" action= "confirm.html"> (Confirm.htmL to the form property. )
thankx for all you help though.
Ok - that works for the confirm.html - but how/where are you processing the $_POST?
(By the way - this is what I was suggesting in the first place.)
(By the way - this is what I was suggesting in the first place.)
ASKER
the same way as I was processing it before...
If that is the case then do this:
if(mail($recipient, $subject, $msg, $mailheaders))
header("location: success.html"); // or whatever you want to call it
and make sure that message is shown in the html of that page.
Am I on track with what you are looking for?