Hi, I am having problems with a small section off my code. There are no errors with the code, it is just not doing what I want it to do. This is what I have at the moment: <?php $db=mssql_connect("blah","blah","blah") or die("Cannot connect to database server"); mssql_select_db("blah",$db); $strSQL="SELECT * FROM School WHERE ([School Code Number] = '" .$_POST['schoolcode']."')"; $result=mssql_query($strSQL); if (is_resource($rsData)) { password2.php; } else { incorrect.html; } ?> bassicly if it finds a schoolcode it will go to password2.php, if there is no school code that matches then it will go to incorrect.html Thanks in advance Sam (CDTC)