deived Posted January 15, 2009 Share Posted January 15, 2009 I'm working on a php/mysql project where people would share there Wii friend codes. Right now I have it so the admin can add a game that isn't in the db so users can add their codes for the game. Since there are lots of games this would be tedious for an admin to stay on top of. I wanted to give the user the ability to add a game that isn't on the list of games but was worried about having a bunch of duplicate or similar entries. My question is, what is the best way to go about checking to see if the game they add isn't already on the list? I can use sql to see if the name matches one on the list, but if there is a misspelling or different punctuation it wouldn't find it. Any tips? BTW - I hope I make sense. Im at work so Im trying to type kinda quick. Link to comment https://forums.phpfreaks.com/topic/141003-a-little-help-search-string/ Share on other sites More sharing options...
MatthewJ Posted January 15, 2009 Share Posted January 15, 2009 Store the names in a table and build a select menu to hold all of the choices... then when someone doesn't find the game they want, they can click a link or add it in a separate text box... Then just check the entered value against the database to see if it already exists... You may still end up with some bad ones or some misspellings, but it will probably cut down on a lot of that. Link to comment https://forums.phpfreaks.com/topic/141003-a-little-help-search-string/#findComment-737994 Share on other sites More sharing options...
flyhoney Posted January 16, 2009 Share Posted January 16, 2009 When a user adds a new game, mark it in the database as unapproved (with an enum or something). Then, create an administration panel where an admin can see all the games that users have added and approve them if they are valid. Link to comment https://forums.phpfreaks.com/topic/141003-a-little-help-search-string/#findComment-738012 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.