So I have this basic script:
/*check if email is valid*/
if (substr_compare ( $email , '@' , 0 )>0)
{
/*put user to temporary database*/
echo 'registration script';
}else{echo 'wrong mail';};
What I want to do is I want to check if string contains symbol '@' (if mail is valid). But it does not work: when I set up variable $email to something like 'name' = the function returns '1', though I assume it should return 0 or -1, as the letter is not there. What am I missing?