Jump to content

Recommended Posts

I have a form with several fields that submits data to a postgresql database.  Some additional functionality I would like to add, any help is greatly appreciated:

 

1.  Have a check for duplicates (against data already in the sql database) completed when text is entered in one of the fields.  No duplicate information can be entered.  I would like to perform this check when the text is entered instead of when the form is submitted.

 

2.  When a box is checked, another window pops up to choose other information; when the information is chosen, the base field is populated.  Does php have this functionality?  Is this better handled with another language?

 

3.  When the form data is submitted, display an error if any of the fields are blank.

 

4.  I'm having trouble formatting a query into table format.  Any advice here would be helpful, currently I can only get it to format in a comma-delimmit(sp?) format.

 

Link to comment
https://forums.phpfreaks.com/topic/78982-solved-php-helpim-stuck/
Share on other sites

Thanks for the help.  I used a different method, but you helped me get to the right place.  It was easier to use the following to see if a filed is blank:

 

if (strlen($_POST['serialnumber']) == 0)
   {
       echo "<h2><b>Serial number field cannot be blank!  Go back, enter data and submit form again.<b></h2><br />";
   } 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.