The proccess.php from that folder looks ok to me. See below for that.
Thanks in advance for any help.
Greg
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','EmailAddress');
pt_register('POST','Comment');
$Comment=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Comment);if($EmailAddress=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$EmailAddress)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Email Address: ".$EmailAddress."
Comment: ".$Comment."
";
$message = stripslashes($message);
mail("greg@bartfieldgroup.com","Form Submitted at your website",$message,"From: phpFormGenerator");
?>
<!-- This is the content of the Thank you page, be careful while changing it -->
<h2>Thank you!</h2>
<table width=50%>
<tr><td>Email Address: </td><td> <?php echo $EmailAddress; ?> </td></tr>
<tr><td>Comment: </td><td> <?php echo $Comment; ?> </td></tr>
</table>
<!-- Do not change anything below this line -->
<?php
}
?>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
Not exactly sure whats wrong. The form is created ok but it will not email out the contents of the form.
Form can be found here
http://www.californiacoastallodging.com/forms/use/test1/form1.html
The proccess.php from that folder looks ok to me. See below for that.
Thanks in advance for any help.
Greg
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','EmailAddress');
pt_register('POST','Comment');
$Comment=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Comment);if($EmailAddress=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$EmailAddress)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Email Address: ".$EmailAddress."
Comment: ".$Comment."
";
$message = stripslashes($message);
mail("greg@bartfieldgroup.com","Form Submitted at your website",$message,"From: phpFormGenerator");
?>
<!-- This is the content of the Thank you page, be careful while changing it -->
<h2>Thank you!</h2>
<table width=50%>
<tr><td>Email Address: </td><td> <?php echo $EmailAddress; ?> </td></tr>
<tr><td>Comment: </td><td> <?php echo $Comment; ?> </td></tr>
</table>
<!-- Do not change anything below this line -->
<?php
}
?>
Forgot to add that all folders and files have been chmod to 755 or 777.
Also when submiot is selected I now get the thank you html. Before I was getting internal server error.
Greg