hi. i have this two variables in my script:
$name
$surname
and i have a form where users enter their name and surname. what i want is that when they enter their name and surname, they do not put any space! something like
John Paul <----- wrong!
JohnPaul or John_Paul <------- ok!
if they do they should be prompted with "pls do not put space in name or surname". what code do i insert to have this kind of validation? i have something to validate the email format:
if (!preg_match("/.*@.*..*/", $_POST['email']) | preg_match("/(<|>)/", $_POST['email'])) {
how do i do the same for the above question? thanks