Please... anybody? This site needs to launch by the end of the week, and I'm getting a little desperate. :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-10-02
I am not able to view your process.php, nor your global.inc.php ..... but, if I had to guess, I would suggest taking a close look at all required items in your process.php, then cross-check and see if any asterisks might have been inadvertently removed while cleaning code in your form1.html
(Hope this reply makes sense to you ...) Nice job on your form!
Reprieve
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for you response, reprieve. I don't know enough about cgi, clearly, but I'm wondering about the CSS formating that I used as a basis for the form. I picked it up pre-coded, and it uses a <label> tag throughout in formatting the text. When I removed the <label> tags, the formatting broke.
Could these <label> tags be messing with the PHP script?
Ugh. What a night I'm having... I got rid of the suspicious <label> tags by replacing them with <samp>, which should be a harmless enough tag. But I'm still getting errors when I submit the form.
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
Have no idea why it doesn't like the email address.
I want to cry...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't know how or why, but the field I entered in Form Generator as "Email Address" got changed in process.php to "Email". As soon as I changed the code in the HTML from name='EmailAddress' to name='Email', it worked.
This seems to be a bug in the program, because I have recreated this form from scratch at least five times now. Could it be that when the field type is set to email, the field is automatically NAMED 'email', no matter what the user enters when creating the form?
Sorry for all the posts. I hope this helps someone who comes here looking for an answer to the same problem.
Cheers, all.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-10-02
Good morning, and good work!
I was getting ready to roll up my sleeves and really dig into this when I saw your most recent message. Phew!
Interesting observation, thank you for sharing this. I am sure it will be of help to others.
I agree, this is a wonderful form tool. I also, as you have expressed, appreciate the developers for their work and for making this available.
Reprieve
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for providing PHPFormGenerator--it's fantastic. I'm having an issue getting it to run, however. This is the 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."
I searched the forum and found that an extra space after an email address can cause this message, so I applied the suggested fix. But still no joy.
Here is the form:
http://angelfishcruises.com/apply/use/MediterraneanCruiseForm/form1.html
process.php is in the same directory, as usual.
I appreciate any advice you can offer to help me over this little installation bump.
Thank you!
Please... anybody? This site needs to launch by the end of the week, and I'm getting a little desperate. :(
I am not able to view your process.php, nor your global.inc.php ..... but, if I had to guess, I would suggest taking a close look at all required items in your process.php, then cross-check and see if any asterisks might have been inadvertently removed while cleaning code in your form1.html
(Hope this reply makes sense to you ...) Nice job on your form!
Reprieve
Thanks for you response, reprieve. I don't know enough about cgi, clearly, but I'm wondering about the CSS formating that I used as a basis for the form. I picked it up pre-coded, and it uses a <label> tag throughout in formatting the text. When I removed the <label> tags, the formatting broke.
Could these <label> tags be messing with the PHP script?
BTW, the link has changed:
http://angelfishcruises.com/apply/use/medcruiseform/form1.html
Ugh. What a night I'm having... I got rid of the suspicious <label> tags by replacing them with <samp>, which should be a harmless enough tag. But I'm still getting errors when I submit the form.
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
Have no idea why it doesn't like the email address.
I want to cry...
Here is the process.php file:
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','FirstName');
pt_register('POST','LastName');
pt_register('POST','Birthdate');
pt_register('POST','Gender');
pt_register('POST','Disability');
pt_register('POST','Address1');
pt_register('POST','Address2');
pt_register('POST','City');
pt_register('POST','State');
pt_register('POST','Zip');
pt_register('POST','Country');
pt_register('POST','HomePhone');
pt_register('POST','WorkPhone');
pt_register('POST','CellPhone');
pt_register('POST','EmailAddress');
pt_register('POST','CabinSelection');
pt_register('POST','Roommate');
pt_register('POST','RoommateName');
pt_register('POST','Comments');
$Comments=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Comments);if($FirstName=="" || $LastName=="" || $Birthdate=="" || $Gender=="" || $Disability=="" || $Address1=="" || $City=="" || $State=="" || $Zip=="" || $Country=="" || $HomePhone=="" || $EmailAddress=="" || $CabinSelection=="" || $Roommate=="" ){
$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="First Name: ".$FirstName."
Last Name: ".$LastName."
Birthdate: ".$Birthdate."
Gender: ".$Gender."
Disability: ".$Disability."
Address 1: ".$Address1."
Address 2: ".$Address2."
City: ".$City."
State: ".$State."
Zip: ".$Zip."
Country: ".$Country."
Home Phone: ".$HomePhone."
Work Phone: ".$WorkPhone."
Cell Phone: ".$CellPhone."
Email Address: ".$EmailAddress."
Cabin Selection: ".$CabinSelection."
Roommate: ".$Roommate."
Roommate Name: ".$RoommateName."
Comments: ".$Comments."
";
$message = stripslashes($message);
mail("lorraine@angelfishcruises.com","Form Submitted at your website",$message,"From: phpFormGenerator");
$link = mysql_connect("localhost","angelfis","LT5161220");
mysql_select_db("angelfis_frgn1",$link);
$query="insert into 08medcruise (First_Name,Last_Name,Birthdate,Gender,Disability,Address_1,Address_2,City,State,Zip,Country,Home_Phone,Work_Phone,Cell_Phone,Email_Address,Cabin_Selection,Roommate,Roommate_Name,Comments) values ('".$FirstName."','".$LastName."','".$Birthdate."','".$Gender."','".$Disability."','".$Address1."','".$Address2."','".$City."','".$State."','".$Zip."','".$Country."','".$HomePhone."','".$WorkPhone."','".$CellPhone."','".$EmailAddress."','".$CabinSelection."','".$Roommate."','".$RoommateName."','".$Comments."')";
mysql_query($query);
$make=fopen("admin/data.dat","a");
$to_put="";
$to_put .= $FirstName."|".$LastName."|".$Birthdate."|".$Gender."|".$Disability."|".$Address1."|".$Address2."|".$City."|".$State."|".$Zip."|".$Country."|".$HomePhone."|".$WorkPhone."|".$CellPhone."|".$EmailAddress."|".$CabinSelection."|".$Roommate."|".$RoommateName."|".$Comments."
";
fwrite($make,$to_put);
header("Refresh: 0;url=http://angelfishcruises.com/thankyou.php");
?><?php
}
?>
Yeesh. It's late and I've gone all stupid. Suffice it to say the database login has been changed since I posted it above. Lord.
Eureka. I finally found it.
I don't know how or why, but the field I entered in Form Generator as "Email Address" got changed in process.php to "Email". As soon as I changed the code in the HTML from name='EmailAddress' to name='Email', it worked.
This seems to be a bug in the program, because I have recreated this form from scratch at least five times now. Could it be that when the field type is set to email, the field is automatically NAMED 'email', no matter what the user enters when creating the form?
Sorry for all the posts. I hope this helps someone who comes here looking for an answer to the same problem.
Cheers, all.
Good morning, and good work!
I was getting ready to roll up my sleeves and really dig into this when I saw your most recent message. Phew!
Interesting observation, thank you for sharing this. I am sure it will be of help to others.
I agree, this is a wonderful form tool. I also, as you have expressed, appreciate the developers for their work and for making this available.
Reprieve