Menu

Required Fields and Database Problems

Help
2002-07-27
2002-08-01
  • S.A. Moorman

    S.A. Moorman - 2002-07-27

    I just downloaded and am experimenting with phpFormGenerator, and I'm having some problems with a simple three-field form (name, e-mail, comments).  First, whenever I designate the fields as required, the form refuses to submit, generating an error message to the effect that a required field has not been filled in, when in fact all three fields have been completed.  Second, without any required fields set, the form submitted successfully (though the results that reached my e-mail address did not include the first two fields, which doesn't bode well), but had a problem writing to my MySQL database:  Specifically, each entry in the database consisted solely of the word "test" rather than the information actually submitted.  Obviously it's connecting, but something's going wrong.

    One additional issue worth noting:  On the MySQL setup portion of the form generation script, the instructions suggest that when creating a *new* table rather than inserting data into an existing table, one need not specify column names.  ("If you chose no, please provide the name of the table to be used, and the columns to enter each of the following fields. (Please note that this table you enter, and its columns must already exist).")  When I left the column fields blank, I received an error message upon form creation indicating that I needed to specify column names, even though I had chosen the create new table option.

    Thanks for your time and attention, and best regards.

    -SAM

     
    • Anonymous

      Anonymous - 2002-07-31

      you wrote:

      > First, whenever I designate the fields as required, the form refuses to submit, generating an error message to the effect that a required field has not been filled in, when in fact all three fields have been completed

      I have had exactly the same problem after setting this up today. It looks like a problem with process.php but being a newbie to php I can't see what is going wrong. If admin can have a look I would be most grateful as this is a useful script with a nice front end which I would be sure to recommend to many other web designers.

       
    • Musawir Ali

      Musawir Ali - 2002-07-31

      Please let me know what version you are trying out. What you speak off was a known bug in the first version, but I remember i fixed that in the recent versions. If you are still using the old version, try out the new version. If the problem still exists, please give me exact input that you are giving to the script so that I can trace your steps and see for myself where the error is coming from. Also, you may want to try out the demo site for the script and see if your problem still occurs in that because that is the latest version. The url is:

      http://phpformgen.sourceforge.net/phpform/

      Enjoy

       
    • Anonymous

      Anonymous - 2002-08-01

      Hi - here is the input from the form....

      <form action='process.php' method=post><table border=0><tr><td>first name</td><td><input type=text name='firstname' size=25>*</td></tr><tr><td>surname</td><td><input type=text name='surname' size=25>*</td></tr><tr><td>company</td><td><input type=text name='company' size=25>*</td></tr><tr><td>branch</td><td><input type=text name='branch' size=25></td></tr><tr><td>address1</td><td><input type=text name='address1' size=25>*</td></tr><tr><td>address2</td><td><input type=text name='address2' size=25></td></tr><tr><td>address3</td><td><input type=text name='address3' size=25></td></tr><tr><td>post-zip code</td><td><input type=text name='post/zipcode' size=15>*</td></tr><tr><td>telephone number</td><td><input type=text name='telephonenumber' size=25>*</td></tr><tr><td>fax number</td><td><input type=text name='faxnumber' size=25>*</td></tr><tr><td>email address</td><td><input type=text name='emailaddress' size=35>*</td></tr><tr><td>modules you are interested in</td><td><select name='modulesyouareinterestedin'><option value='sellfone retail'>sellfone retail<option value='sellfone headoffice'>sellfone headoffice<option value='sellfone retail & ho'>sellfone retail & ho<option value='sellfone distribution'>sellfone distribution<option value='service module'>service module<option value='servicebase'>servicebase<option value='other'>other</select></td></tr><tr><td>number of retail outlets (if applicable)</td><td><select name='numberofretailoutlets(ifapplicable)'><option value='1-10'>1-10<option value='11-50'>11-50<option value='51-100'>51-100<option value='100+'>100+<option value='n/a'>n/a</select></td></tr><tr><td>comments</td><td><textarea name='comments' rows=6 cols=25></textarea></td></tr></table><input type=submit value='Submit Form'> <input type=reset value='Reset Form'></form>

      I have checked and am using latest version, v1.02 with .php extensions, on rehat linux 6.0 server.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.