I would like an input text field to only allow the following:
- Letters and numbers (alphanumerics)
- The '&' character
The following code will meet the first condition but not the second can I cant seem to get it to work 🙁
if (!ereg("^[[:space:][:alnum:]]+$", $txfTrack))
{
$errMsg .= "Please use only letters and numbers in 'track' field<br>";
}
any help much appreciated,
Gerry
reg-exp newbie