sono-io@xxxxxxxxxxxxx a écrit :
Here's an example: let's say there is an itemID of 4D-2448-7PS but someone omits the dashes and searches on 4D24487PS. Is it possible in PHP to have the find be successful, even if the search criteria doesn't exactly match what's stored in the field?
I think you don't follow the good path. A good way could be to have a strenger UI management. For exemple, here, you have an ID that is composed about 3 bits. So do the UI present three input fields, or write a smart input (with JS).
Of course, in the control side (PHP), you have to check the format of the returned data. Here you can reject the input, or fall through some segment of code that try to interpret the submitted value. But in first time, do it simple and be rough to users. Usability can be improved in a second time.
-- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php