I am misunderstanding the PHP Manual, where it says:- mixed *mssql_query* ( string query [, resource link_identifier [, int batch_size]] ) Returns: A MS SQL result resource on success, *TRUE* if no rows were returned, or *FALSE* on error. and my code reads:- $passwd = ""; // for debugging only $insert = sprintf("INSERT INTO Users (FirstName, LastName, Usrname, Passwrd, AccessLevel, last_login, UserID) VALUES ('%s', '%s', '%s', '%s', '%d', '%s', '%d')", $FirstName, $Surname, $uname, $passwd, $accesslevel, $regdate, $_SESSION['UID']); $Reply = mssql_query($insert, $link); if ($Reply == FALSE) { $Message = sprintf("%s %d <br>Record not inserted. Please refer problem to Admin.", __FILE__, __LINE__); trigger_error($Message, E_USER_ERROR, $link); exit; } Maybe on an insert, no rows would be returned and therefore I possibly should be checking for something other than "if ($Reply == FALSE)"?