jamesnkk Posted March 16, 2006 Share Posted March 16, 2006 Hi, I am a newbies here, just started learning PHP, Could not find an answer to my requirement, hope some experts can offer help.Here I have an entry from for entering Part numbers, description, price and qty so on...So when a user enter a part number, I would want to immediate check if this part numbers already exist before the user click the submit button to post. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 16, 2006 Share Posted March 16, 2006 That can only be done via Javascript and AJAX.Ken Quote Link to comment Share on other sites More sharing options...
jamesnkk Posted March 16, 2006 Author Share Posted March 16, 2006 [!--quoteo(post=355599:date=Mar 17 2006, 01:55 AM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Mar 17 2006, 01:55 AM) [snapback]355599[/snapback][/div][div class=\'quotemain\'][!--quotec--]That can only be done via Javascript and AJAX.Ken[/quote]Ken, Thank for your fast response, do you mean I can only use javascript to query the table ?, and not possible in PHP ? Quote Link to comment Share on other sites More sharing options...
ober Posted March 16, 2006 Share Posted March 16, 2006 You can do this both ways.1) You can have them enter a part number and give them a button. The button submits the form and either takes them to a second form where they fill in additional information about the part to be submitted for insertion, or it takes them to a page that says the part already exists.2) Same as above, but you use AJAX to return the results. If you don't understand what AJAX is, check out www.ajaxfreaks.com (a sister site of phpfreaks). It's a javascript call that can run a PHP script that will return data to a specified area of your page without reloading the page.I'd personally go with AJAX, but it requires the user to have Javascript enabled to use the functionality of the site. Quote Link to comment Share on other sites More sharing options...
jamesnkk Posted March 16, 2006 Author Share Posted March 16, 2006 [!--quoteo(post=355614:date=Mar 17 2006, 02:33 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ Mar 17 2006, 02:33 AM) [snapback]355614[/snapback][/div][div class=\'quotemain\'][!--quotec--]You can do this both ways.1) You can have them enter a part number and give them a button. The button submits the form and either takes them to a second form where they fill in additional information about the part to be submitted for insertion, or it takes them to a page that says the part already exists.2) Same as above, but you use AJAX to return the results. If you don't understand what AJAX is, check out www.ajaxfreaks.com (a sister site of phpfreaks). It's a javascript call that can run a PHP script that will return data to a specified area of your page without reloading the page.I'd personally go with AJAX, but it requires the user to have Javascript enabled to use the functionality of the site.[/quote]Thank for the advises, well consider Quote Link to comment 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.