The form generator didn't ask for a "From" address, and thus didn't put it int he process file. I will add it...but I wondered how it arrived at the address it used when I tested. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I noticed when one adds a Text Bob (textarea) that it gives you the ability to add 'size' but when you go to edit after saving it gives you, correctly, the ability to indicate 'rows' and 'cols'. I suspect that needs correcting.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I looked you up and you are that idiot who has been posting "security issues in phpFormGenerator" at random websites. After that attempt has failed, now you are coming to the forums and polluting them with your SPAM and phising nonsense? How pathetic are you? Do you have nothing better to do than go out of the way to disrespect free software?
Anyway, consider this as a warning. Any more retarded forum pollution from you and I will revoke your right to post here. You can continue your pathetic whining elsewhere and see if anyone gives a crap.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How do I send a zip file to you as the email form has no attachments. Other than that I am comfortable with editing php etc.. just would not know which bits to change or add! I believe none of the checkboxs generated by PhpFormGenerator validate so if its just a case of correcting the script if you could post a fix here and I could add it that would be great.
Cheers!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry if these are newbie questions, but we all got to start somewhere, eh?
1. If the database doesn't already exist, will install.php create it?
2. Could some of the lessons found on this page be distilled into a readme.txt included in the .zip file? One item I learned was that the .php files had to be chmod +x to work.
3. Anyone have any suggestions about this output from install.php?
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /var/www/WM2008registration/install.php on line 201
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'httpd'@'localhost' (using password: NO) in /var/www/WM2008registration/install.php on line 202
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /var/www/WM2008registration/install.php on line 202
Warning: mysql_query() [function.mysql-query]: Access denied for user 'httpd'@'localhost' (using password: NO) in /var/www/WM2008registration/install.php on line 222
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /var/www/WM2008registration/install.php on line 222
Error! Table not be created.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The install.php should create a new SQL db but it needs a valid username and password to do so. I haven't looked lately so I can not remember if the username and password are part of the install.php file. In any case the errors you mention are related to not having valid permissions to create the table.
Look into the file and cange the host, table, user, and password data to something valid and it should work. If you still need help you can come back and post again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Where does one designate whether a field is required or not. When using the form generator, it doesn't allow me to do that, if I click on "Yes" or "No" it doesn't do anything, so I'm assuming I can change it somewhere in the form code or processor.
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Some form features have code for required items some don't. What are you attempting to make required, and what exactly is not working?
You can change the form.html java code if you know java. All form preprocessing (required/syntax chaecking) is done in java before the processor.php file is called.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, I finally got my first PHP form to work! Thanks for the help above. It all had to do with the fact that I was hosting my own, freshly installed webserver. I needed to put appropriate permissions in place to allow httpd to write to tables. During the process, I found a few simple additions in install.php helped me greatly. I changed:
mysql_select_db($_POST['dbName']);
to
mysql_select_db($_POST['dbName']) or die("Error! Table not selected. Error message: " . mysql_error() );
and changed:
field_19 TEXT )") or die("Error! Table not created.");
to
field_19 TEXT )") or die("Error! Table not created. Error message: " . mysql_error() );
Perhaps these would be useful additions to the generator?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Let me start by saying this is a great program and fairly easy to understand how to change. Which is a good thing since I am new to php. I have read all of the postings here trying to figure out how to get the form I created on the demo site to do what I want. I even tried the php site (http://us3.php.net/function.mail). I have gotten everything to work great except I can't figure out how to get the resulting email to come from something other than "Nobody" <nobody at host.myhost.com>. While I would prefer to have the message come from the user that has completed the form (user <email>), I would settle for a valid address at my domain. I have only changed the subject and the include file from the original generated on the demo site. I have tried various things using the $header parameter, but nothing seems to work. Although I have been able to get the header to print in the body of the message, I can't get it to show in the From header. I'm sure it's probably something simple, but I have beaten my head against this wall long enough.
Would someone please tell me what I need to add to make this work before my head explodes? Thanks
On the site you mention here is the example mail function:
Example 1108. Sending mail with extra headers.
The addition of basic headers, telling the MUA the From and Reply-To addresses:
<?php
$to = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
You can see from the mail function that the form is:
mail({send to address},{mail subject},{mail message},{mail header});
In your processor.php file you have the following:
mail("me at mydomain.com","Information Request","Form data:
...
...
...
powered by phpFormGenerator.
");
As you can see there are only 3 fields, not 4 as in the example so you are missing the {mail header} portion.
If you make the following change you can set the "From:" field:
powered by phpFormGenerator.
",$headers);
This assumes you have used the example code somewhere in your processor.php file. For example:
...
...
// Checkbox handling
$field_18_opts = $_POST['field_18'][0];
Ok, I must be really brain dead today. I put in the changes and now the from shows up as $from_email@host.myhost.com.
I can see where we are defining that $from_email should be the email address that the user enters, ie field_10. And that we then define $headers to be From and Reply to $from_email. Which all makes sense. So why isn't the value entered in field_10 showing up in the header?
Here's what my processor.php file looks like now. Did I miss something I was supposed to do? Thanks
[11-Sep-2007 09:49:08] PHP Fatal error: Call to undefined function: imagettfbbox() in /home/ccc/public_html/contact/CaptchaSecurityImages.php on line 60...(means that you don't have FreeType support.)
...and you're using cPanel, all you have to do is....enable Free Type support from WHM >> Software >> 'Apache Update' option. Click on "Load Previous Confing" button which will show you the current modules installed and scroll down the page and select "Freetype Support". Start Build.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
VERY NICE!
I'd like to see the field-1, etc in the database replaced by the field name or have the option to name it.
Also, to do a file AND database at the same time.
Where would I find the admin page so I can view the file?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Currently this version does not have an Admin feature to view form results. It is possible to use the previous version 2.09 admin feature to view the new version 3.0 form data but it would require some adjustments to get data from the new form SQL db.
Renaming the fields can be done but it would require a significant amount of form rework work. It is better to support this right from the generator. Your best bet is to make a "new feature request" under the "Tracker" tab at the top of this forum site.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, i created the form and it seemed like it all went well. However when i tried to download and uncompress the zip file it didnt work. It said that an error occured. I tried with other forms and the same thing kept happening. Is this just my computer, if so is there anything to get it to work. Thanks will
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The form generator didn't ask for a "From" address, and thus didn't put it int he process file. I will add it...but I wondered how it arrived at the address it used when I tested. :)
Hi, I noticed when one adds a Text Bob (textarea) that it gives you the ability to add 'size' but when you go to edit after saving it gives you, correctly, the ability to indicate 'rows' and 'cols'. I suspect that needs correcting.
Hi,
I noticed one big thing missing from yous the tool is the ability to add a description plain old infromation.
I noticed the following:
- Quotes are not allowed in question topics.
- Lists are not always in the order I inputed them.
Thanks for your efforts in this project!
To morning_wood:
I looked you up and you are that idiot who has been posting "security issues in phpFormGenerator" at random websites. After that attempt has failed, now you are coming to the forums and polluting them with your SPAM and phising nonsense? How pathetic are you? Do you have nothing better to do than go out of the way to disrespect free software?
Anyway, consider this as a warning. Any more retarded forum pollution from you and I will revoke your right to post here. You can continue your pathetic whining elsewhere and see if anyone gives a crap.
Hi,
Can anyone get the "Checkbox(s)" to validate as I can not get them to work as a required field when selected to be a required field.
Cheers
Any help that I provide may require that you edit some files. If you are comfortable with that send me your zip file and I will see what can be done.
Thanks TNTEverett!
How do I send a zip file to you as the email form has no attachments. Other than that I am comfortable with editing php etc.. just would not know which bits to change or add! I believe none of the checkboxs generated by PhpFormGenerator validate so if its just a case of correcting the script if you could post a fix here and I could add it that would be great.
Cheers!
You can send me the link for your zip file or the form number and I can download it like you did from the generator.
Sorry if these are newbie questions, but we all got to start somewhere, eh?
1. If the database doesn't already exist, will install.php create it?
2. Could some of the lessons found on this page be distilled into a readme.txt included in the .zip file? One item I learned was that the .php files had to be chmod +x to work.
3. Anyone have any suggestions about this output from install.php?
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /var/www/WM2008registration/install.php on line 201
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'httpd'@'localhost' (using password: NO) in /var/www/WM2008registration/install.php on line 202
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /var/www/WM2008registration/install.php on line 202
Warning: mysql_query() [function.mysql-query]: Access denied for user 'httpd'@'localhost' (using password: NO) in /var/www/WM2008registration/install.php on line 222
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /var/www/WM2008registration/install.php on line 222
Error! Table not be created.
The install.php should create a new SQL db but it needs a valid username and password to do so. I haven't looked lately so I can not remember if the username and password are part of the install.php file. In any case the errors you mention are related to not having valid permissions to create the table.
Look into the file and cange the host, table, user, and password data to something valid and it should work. If you still need help you can come back and post again.
Where does one designate whether a field is required or not. When using the form generator, it doesn't allow me to do that, if I click on "Yes" or "No" it doesn't do anything, so I'm assuming I can change it somewhere in the form code or processor.
Thanks!
Some form features have code for required items some don't. What are you attempting to make required, and what exactly is not working?
You can change the form.html java code if you know java. All form preprocessing (required/syntax chaecking) is done in java before the processor.php file is called.
So is it the validatePage script? Do I just need to change the "0" to "1" on anything that I want required?
Thanks!
validate_field
validate_email
validateDate
It depends on what you ask for and whether or not what you ask for has been fully implemented.
Okay, I finally got my first PHP form to work! Thanks for the help above. It all had to do with the fact that I was hosting my own, freshly installed webserver. I needed to put appropriate permissions in place to allow httpd to write to tables. During the process, I found a few simple additions in install.php helped me greatly. I changed:
mysql_select_db($_POST['dbName']);
to
mysql_select_db($_POST['dbName']) or die("Error! Table not selected. Error message: " . mysql_error() );
and changed:
field_19 TEXT )") or die("Error! Table not created.");
to
field_19 TEXT )") or die("Error! Table not created. Error message: " . mysql_error() );
Perhaps these would be useful additions to the generator?
Hi,
Let me start by saying this is a great program and fairly easy to understand how to change. Which is a good thing since I am new to php. I have read all of the postings here trying to figure out how to get the form I created on the demo site to do what I want. I even tried the php site (http://us3.php.net/function.mail). I have gotten everything to work great except I can't figure out how to get the resulting email to come from something other than "Nobody" <nobody at host.myhost.com>. While I would prefer to have the message come from the user that has completed the form (user <email>), I would settle for a valid address at my domain. I have only changed the subject and the include file from the original generated on the demo site. I have tried various things using the $header parameter, but nothing seems to work. Although I have been able to get the header to print in the body of the message, I can't get it to show in the From header. I'm sure it's probably something simple, but I have beaten my head against this wall long enough.
Would someone please tell me what I need to add to make this work before my head explodes? Thanks
Here is what I have in my processor.php file:
<?php
$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
session_start();
if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) {
// Checkbox handling
$field_13_opts = $_POST['field_13'][0];
// Checkbox handling
$field_14_opts = $_POST['field_14'][0];
// Checkbox handling
$field_15_opts = $_POST['field_15'][0];
// Checkbox handling
$field_16_opts = $_POST['field_16'][0];
// Checkbox handling
$field_17_opts = $_POST['field_17'][0];
// Checkbox handling
$field_18_opts = $_POST['field_18'][0];
mail("me at mydomain.com","Information Request","Form data:
Name: " . $_POST['field_1'] . "
Company Name: " . $_POST['field_2'] . "
Street Address: " . $_POST['field_3'] . "
City: " . $_POST['field_4'] . "
State/Province: " . $_POST['field_5'] . "
Zip/Postal Code: " . $_POST['field_6'] . "
Country: " . $_POST['field_7'] . "
Phone Number: " . $_POST['field_8'] . "
Fax Number: " . $_POST['field_9'] . "
Email Address: " . $_POST['field_10'] . "
Practice Area: " . $_POST['field_11'] . "
Industry Experience: " . $_POST['field_12'] . "
Call Me: $field_13_opts
E-mail me: $field_14_opts
Send me their brochures or other literature by mail: $field_15_opts
Brochure: $field_16_opts
Names of members available to speak at a conference: $field_17_opts
Names of members available for interviews: $field_18_opts
Comments or other requests: " . $_POST['field_19'] . "
powered by phpFormGenerator.
");
include("thank_you.html");
}
else {
echo "Invalid Captcha String.";
}
?>
On the site you mention here is the example mail function:
Example 1108. Sending mail with extra headers.
The addition of basic headers, telling the MUA the From and Reply-To addresses:
<?php
$to = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
You can see from the mail function that the form is:
mail({send to address},{mail subject},{mail message},{mail header});
In your processor.php file you have the following:
mail("me at mydomain.com","Information Request","Form data:
...
...
...
powered by phpFormGenerator.
");
As you can see there are only 3 fields, not 4 as in the example so you are missing the {mail header} portion.
If you make the following change you can set the "From:" field:
powered by phpFormGenerator.
",$headers);
This assumes you have used the example code somewhere in your processor.php file. For example:
...
...
// Checkbox handling
$field_18_opts = $_POST['field_18'][0];
$from_email = $_POST['field_10'];
$headers = 'From: $from_email' . "\r\n" .
'Reply-To: $from_email';
mail("...
...
...
Ok, I must be really brain dead today. I put in the changes and now the from shows up as $from_email@host.myhost.com.
I can see where we are defining that $from_email should be the email address that the user enters, ie field_10. And that we then define $headers to be From and Reply to $from_email. Which all makes sense. So why isn't the value entered in field_10 showing up in the header?
Here's what my processor.php file looks like now. Did I miss something I was supposed to do? Thanks
<?php
$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
session_start();
if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) {
// Checkbox handling
$field_13_opts = $_POST['field_13'][0];
// Checkbox handling
$field_14_opts = $_POST['field_14'][0];
// Checkbox handling
$field_15_opts = $_POST['field_15'][0];
// Checkbox handling
$field_16_opts = $_POST['field_16'][0];
// Checkbox handling
$field_17_opts = $_POST['field_17'][0];
// Checkbox handling
$field_18_opts = $_POST['field_18'][0];
$from_email = $_POST['field_10'];
$headers = 'From: $from_email' . "\r\n" .
'Reply-To: $from_email';
mail("me at mydomain.com","Information Request","Form data:
Name: " . $_POST['field_1'] . "
Company Name: " . $_POST['field_2'] . "
Street Address: " . $_POST['field_3'] . "
City: " . $_POST['field_4'] . "
State/Province: " . $_POST['field_5'] . "
Zip/Postal Code: " . $_POST['field_6'] . "
Country: " . $_POST['field_7'] . "
Phone Number: " . $_POST['field_8'] . "
Fax Number: " . $_POST['field_9'] . "
Email Address: " . $_POST['field_10'] . "
Practice Area: " . $_POST['field_11'] . "
Industry Experience: " . $_POST['field_12'] . "
Call Me: $field_13_opts
E-mail me: $field_14_opts
Send me their brochures or other literature by mail: $field_15_opts
Brochure: $field_16_opts
Names of members available to speak at a conference: $field_17_opts
Names of members available for interviews: $field_18_opts
Comments or other requests: " . $_POST['field_19'] . "
powered by phpFormGenerator.
",$headers);
include("thank_you.html");
}
else {
echo "Invalid Captcha String.";
}
?>
$headers = 'From: $from_email' . "\r\n" .
'Reply-To: $from_email';
Probably wants to be:
$headers = 'From: ' . $from_email . "\r\n" .
'Reply-To: ' . $from_email;
Hurray!!! Success at last!!! Thank you so much for your help.
Captcha not working?
If you're getting errors like the following...
[11-Sep-2007 09:49:08] PHP Fatal error: Call to undefined function: imagettfbbox() in /home/ccc/public_html/contact/CaptchaSecurityImages.php on line 60...(means that you don't have FreeType support.)
...and you're using cPanel, all you have to do is....enable Free Type support from WHM >> Software >> 'Apache Update' option. Click on "Load Previous Confing" button which will show you the current modules installed and scroll down the page and select "Freetype Support". Start Build.
VERY NICE!
I'd like to see the field-1, etc in the database replaced by the field name or have the option to name it.
Also, to do a file AND database at the same time.
Where would I find the admin page so I can view the file?
Thanks!
Currently this version does not have an Admin feature to view form results. It is possible to use the previous version 2.09 admin feature to view the new version 3.0 form data but it would require some adjustments to get data from the new form SQL db.
Renaming the fields can be done but it would require a significant amount of form rework work. It is better to support this right from the generator. Your best bet is to make a "new feature request" under the "Tracker" tab at the top of this forum site.
Hi, i created the form and it seemed like it all went well. However when i tried to download and uncompress the zip file it didnt work. It said that an error occured. I tried with other forms and the same thing kept happening. Is this just my computer, if so is there anything to get it to work. Thanks will