atl_andy Posted November 26, 2007 Share Posted November 26, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/78982-solved-php-helpim-stuck/ Share on other sites More sharing options...
xyn Posted November 26, 2007 Share Posted November 26, 2007 1. use ajax. although is javascript if turned off. Theres problems. 2. use the onclick. again if javascript is turned off. this results in pop-up failure. 3. php.net/isset 4. i only know mysql, mssql. sorry [: Quote Link to comment https://forums.phpfreaks.com/topic/78982-solved-php-helpim-stuck/#findComment-399696 Share on other sites More sharing options...
atl_andy Posted November 27, 2007 Author Share Posted November 27, 2007 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 />"; } Quote Link to comment https://forums.phpfreaks.com/topic/78982-solved-php-helpim-stuck/#findComment-399888 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.