JustAnotherDude
10-23-07, 19:37
If a user enters more than one email address in a form field, what's best way to only allow the first one?
I thought about using explode, but the code I came up with seems rather inefficient, because the user may enter the data with "comma" between the addresses, or with "semicolon" between the addresses, and with or without whitespace between the addresses.
Suggestions greatly appreciated.
Thanks!
I thought about using explode, but the code I came up with seems rather inefficient, because the user may enter the data with "comma" between the addresses, or with "semicolon" between the addresses, and with or without whitespace between the addresses.
Suggestions greatly appreciated.
Thanks!