You have to use `ereg' function or someting similar.
For example next line is checking if the input_field lokks like:
foo@bar.com
foo,bar are any characters sequence except space.
if ( !ereg("[[:space:]]+@[[:space:]]+.[[:space:]]+$", trim($input_field)) ){
// the email address is wrong
}
Marcel
Remco Meeder wrote:
Hi,
Is it possible to check the text which someone types in a textbox for certain characters? I have a PHP form in which peope, among other things, have to enter an email address. Is it possible to let PHP check the string for the presence of the '@' sign?
thanks,
Remco Meeder