I have created a form to collect up to 6 lines of data in a number of different fields (text boxes, drop down menus and textarea). Only two of the text boxes are mandatory, the rest are optional. Consequently, I have only included the "standard" error message script for the two mandatory fields at the start of the .php file.
However, when I try to run the file (having completed only the mandatory fields), I get the following error message:
"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."
Can anyone help please?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are going to have to look into the process.php file to see what variables are checked and what conditions would result in an error.
If you don't know how to do this send me the process.php file and a pointer to the form in an email. I will help you determine where the error is.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Simple answer.
In the form-x.html file:
Yourcallsign
In the form.php file:
yourcallsign
See the difference?
Since the form.php file has multiple instances of the variable name the simple solution is to change the one entry in the html file to all lower case.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"All I am getting is the field names and not the data"
You need to register all the variables you add to the php file.
pt_register('POST','dxcallsign');
pt_register('POST','emailaddress');
pt_register('POST','band1');
pt_register('POST','mode1');
pt_register('POST','dd1');
pt_register('POST','mmm1');
pt_register('POST','yyyy1');
pt_register('POST','hour1');
pt_register('POST','min1');
pt_register('POST','band2');
pt_register('POST','mode2');
pt_register('POST','dd2');
pt_register('POST','mmm2');
pt_register('POST','yyyy2');
pt_register('POST','hour2');
pt_register('POST','min2');
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have created a form to collect up to 6 lines of data in a number of different fields (text boxes, drop down menus and textarea). Only two of the text boxes are mandatory, the rest are optional. Consequently, I have only included the "standard" error message script for the two mandatory fields at the start of the .php file.
However, when I try to run the file (having completed only the mandatory fields), I get the following error message:
"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."
Can anyone help please?
You are going to have to look into the process.php file to see what variables are checked and what conditions would result in an error.
If you don't know how to do this send me the process.php file and a pointer to the form in an email. I will help you determine where the error is.
The php file needs to be sent as an attachment. Also the URL to the form does not seem to be valid.
www.g3swh.org
"DNS_HOST_NOT_FOUND"
Simple answer.
In the form-x.html file:
Yourcallsign
In the form.php file:
yourcallsign
See the difference?
Since the form.php file has multiple instances of the variable name the simple solution is to change the one entry in the html file to all lower case.
Many thanks. That now works OK.
Now to get the rest of the oage working!
Regards
"All I am getting is the field names and not the data"
You need to register all the variables you add to the php file.
pt_register('POST','dxcallsign');
pt_register('POST','emailaddress');
pt_register('POST','band1');
pt_register('POST','mode1');
pt_register('POST','dd1');
pt_register('POST','mmm1');
pt_register('POST','yyyy1');
pt_register('POST','hour1');
pt_register('POST','min1');
pt_register('POST','band2');
pt_register('POST','mode2');
pt_register('POST','dd2');
pt_register('POST','mmm2');
pt_register('POST','yyyy2');
pt_register('POST','hour2');
pt_register('POST','min2');
Does that not make them mandatory? Or am I misunderstanding (again)?
Regards
Register does not mean mandatory. Mandatory variables are handled with error conditions like this one.
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$Email)){
$error.="<li>Invalid email address entered";
$errors=1;
}
or this one
if($FirstName=="" || $LastName==""){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again."; }