Hello, I am wrining a script that insert students in a database: name, email,.... the data retrive (from text-file) and storing (into database) works fine, but when I want to check if a student is already in the database, I look for the email address, and when I use: $check_email = mysql_query("SELECT student_id FROM pdc_student WHERE student_email=\"".$student_email."\"", $con); $number = mysql_numrows($check_email); if ($number == 0) { ....... OR $check_email = mysql_query("SELECT student_id from pdc_student where 1 and student_email like \"$student_email\"", $con); $number = mysql_numrows($check_email); if ($number == 0) { ........ it works fine EXCEPT if the email address contains "_" for example, if I try to add a student with email: [EMAIL PROTECTED], it won't be able to find if the email exists already in the db, it will just add that student even if the email exists already. And this "_" is allowed for email address... :( Anybody encounters that problem and could help me to solve it? Thanks, -Alain- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]