J
Jeffrey Silverman
<Whew>
You've all bee right in different ways. The help desk ticket returned
that same info: DW html code was mucking up the page, script couldn't
run...
I fixed that, DW has a view that shows whether or not the code is being
accepted as PHP or HTML. That part is done, and PHP appears to be
functioning on the warped site just fine...
Now, when I try to process the form:
http://www.vacavillemultimedia.com/contact.html
Using the PHP that was kindly written by Mr. Finkle:
http://www.vacavillemultimedia.com/form_processor.html
I get this error message:
Warning: Cannot modify header information - headers already sent by
(output started at
/raid/ATL/vips/home0/pmlozzi/vacavillemultimedia.com/form_processor.php:7)
in
/raid/ATL/vips/home0/pmlozzi/vacavillemultimedia.com/form_processor.php
on line 15
This is the script I am using:
<html>
<head>
<title>form_processor</title>
</head>
<body>
<center>
<?
foreach ($_REQUEST as $key => $value){
$message .= $key .' = '. $value."\n";
}
mail("(e-mail address removed)","Email Form",$message);
header("Location: confirmation.html");
exit;
?>
</body>
</html>
So the PHP is obviously being interpreted, but there is some error in
the script, I guess...
If there's anyone who can guide this novice just one step further, I
know it is you guys...
And I thank everyone again for my education with scripts, PHP, CGI and
the like. I am hoping I can use this knowledge to help out someone new.
Thanks again...
Pete
Get rid of EVERYTHING before the first <? and EVERYTHING after the last ?>
"EVERYTHING" includes whitespace. The resulting file should look like
this:
<?
foreach ($_REQUEST as $key => $value){
$message .= $key .' = '. $value."\n";
}
mail("(e-mail address removed)","Email Form",$message);
header("Location: confirmation.html");
exit;
?>
Remember, this is a pure PHP processing page and there need be (in fact,
there must not be) any HTML code in there at all.
Read a little more on how PHP works at http://www.php.net
http://us4.php.net/tut.php
later...