I have the same problem as another post, but their fix was not the same for me. I have an 8 field form with the first three fields required. When I fill in the form all fields or just the required fields I get this error:
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
Here 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','fname');
pt_register('POST','lname');
pt_register('POST','email');
pt_register('POST','phone');
pt_register('POST','address');
pt_register('POST','city');
pt_register('POST','state');
pt_register('POST','zip');
if($fname=="" || $lname=="" || $email=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("^+(+)*" ."@"."(+(+)*)+"."\\.{2,}"."$",$email)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="fname: ".$fname."
lname: ".$lname."
email: ".$email."
phone: ".$phone."
address: ".$address."
city: ".$city."
state: ".$state."
zip: ".$zip."
";
$message = stripslashes($message);
mail("dennis@ttmarconsulting.com","Form Submitted at your website",$message,"From: phpFormGenerator");
$link = mysql_connect("localhost","ttmarweb_dennis","BigD2011");
mysql_select_db("ttmarweb_bridgeloancontacts",$link);
$query="insert into names (fname,lname,email,phone,address,city,state,zip) values ('".$fname."','".$lname."','".$email."','".$phone."','".$address."','".$city."','".$state."','".$zip."')";
mysql_query($query);
I have the same problem as another post, but their fix was not the same for me. I have an 8 field form with the first three fields required. When I fill in the form all fields or just the required fields I get this error:
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
Here 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','fname');
pt_register('POST','lname');
pt_register('POST','email');
pt_register('POST','phone');
pt_register('POST','address');
pt_register('POST','city');
pt_register('POST','state');
pt_register('POST','zip');
if($fname=="" || $lname=="" || $email=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("^+(+)*" ."@"."(+(+)*)+"."\\.{2,}"."$",$email)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="fname: ".$fname."
lname: ".$lname."
email: ".$email."
phone: ".$phone."
address: ".$address."
city: ".$city."
state: ".$state."
zip: ".$zip."
";
$message = stripslashes($message);
mail("dennis@ttmarconsulting.com","Form Submitted at your website",$message,"From: phpFormGenerator");
$link = mysql_connect("localhost","ttmarweb_dennis","BigD2011");
mysql_select_db("ttmarweb_bridgeloancontacts",$link);
$query="insert into names (fname,lname,email,phone,address,city,state,zip) values ('".$fname."','".$lname."','".$email."','".$phone."','".$address."','".$city."','".$state."','".$zip."')";
mysql_query($query);
header("Refresh: 0;url=http://bridgeloanpro.com/thank_you.php");
?><?php
}
?>