JakeMogul Posted November 29, 2012 Share Posted November 29, 2012 So this has been bugging me for a while. I'm trying to create an ordering system for my work. Any product that needs to be restocked has to be typed into a text box. All entries are added to a list. BUT... Anything that's typed into the text box has to match with the product name in an existing table of data in the database. This is to prevent staff from ordering items that they shouldn't because fewer and fewer suppliers are willing to accept returns these days. If it was free text I could easily create this, but I'm not sure how to go about having the character string entered into the text box compared to product names in a table? Any help? Thanks... Quote Link to comment https://forums.phpfreaks.com/topic/271346-comparing-entered-data-to-existing-product-names-in-a-table/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 29, 2012 Share Posted November 29, 2012 (edited) You would avoid the problem entirely by retrieving a list of permitted items from the database and present that to the user to pick from, typically via a select/option drop-down menu. Edited November 29, 2012 by PFMaBiSmAd Quote Link to comment https://forums.phpfreaks.com/topic/271346-comparing-entered-data-to-existing-product-names-in-a-table/#findComment-1396176 Share on other sites More sharing options...
JakeMogul Posted November 30, 2012 Author Share Posted November 30, 2012 Yes, I could do this, but there'll be more than 2000 items in the list. I don't know how practical it would be... Quote Link to comment https://forums.phpfreaks.com/topic/271346-comparing-entered-data-to-existing-product-names-in-a-table/#findComment-1396308 Share on other sites More sharing options...
PFMaBiSmAd Posted November 30, 2012 Share Posted November 30, 2012 You would have category menu/links or a type-a-head search to limit the selections to a smaller set. Quote Link to comment https://forums.phpfreaks.com/topic/271346-comparing-entered-data-to-existing-product-names-in-a-table/#findComment-1396309 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.