I get the following error with every form I try to create and use"
The following errors occured while processing your form input.
You did not enter one or more of the required fields. Please go back and try again.
Invalid email address entered
I have check permisions and as far as I can tell they are all correct everything is 777 except for process.php, admin and files, thay are 755. Below is my process.php file:
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','EmailAddess');
pt_register('POST','Message');
$Message=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Message);if($EmailAddess=="" $Message=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("+(+)*" ."@"."(+(+)*)+"."\\.{2,}"."$",$EmailAddess)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARSHTTPS?=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Email Addess: ".$EmailAddess."
Message: ".$Message."
";
$message = stripslashes($message);
mail("jsktech@…","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 Addess: </td><td> <?php echo $EmailAddess; ?> </td></tr>
<tr><td>Message: </td><td> <?php echo $Message; ?> </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:
pt_register('POST','EmailAddess');
This is an old method that WILL create problems with newer revisions of PHP.
Change all of these to:
$EmailAddess=$_POST;
Then remove this line:
include("global.inc.php");
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I get the following error with every form I try to create and use"
The following errors occured while processing your form input.
You did not enter one or more of the required fields. Please go back and try again.
Invalid email address entered
I have check permisions and as far as I can tell they are all correct everything is 777 except for process.php, admin and files, thay are 755. Below is my process.php file:
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','EmailAddess');
pt_register('POST','Message');
$Message=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Message);if($EmailAddess=="" $Message=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("+(+)*" ."@"."(+(+)*)+"."\\.{2,}"."$",$EmailAddess)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARSHTTPS?=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Email Addess: ".$EmailAddess."
Message: ".$Message."
";
$message = stripslashes($message);
mail("jsktech@…","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 Addess: </td><td> <?php echo $EmailAddess; ?> </td></tr>
<tr><td>Message: </td><td> <?php echo $Message; ?> </td></tr>
</table>
<!- Do not change anything below this line ->
<?php
}
?>
sounds like a permission error to me.
Change all Directories to 755 and files to 644
pt_register('POST','EmailAddess');
This is an old method that WILL create problems with newer revisions of PHP.
Change all of these to:
$EmailAddess=$_POST;
Then remove this line:
include("global.inc.php");