Hi All I am using following code and I am getting the following response ... kindly help me ....
// check to see if $PHP_AUTH_USER already contains information if (!isset($PHP_AUTH_USER)) { //if empty, send header causing dialog box to appear header('WWW-Authenticate: Basic realm = "Sequence Database"'); header('HTTP/1.0 401 Unauthorised'); echo 'Authorisation Required'; exit; } else { //open database connection include("dbconnect1.php3"); //Formualte the query $sql ="Select user_id from user_table where user_id=\"$PHP_AUTH_USER\" and user_psswd = password('$PHP_AUTH_PW')"; //execute the query and put the result in $result $result = mysql_query($sql) or die ("Couldn't get results"); //get the number of rows in $result. should be 0 if valid. 1 if invalid $num= mysql_num_rows($result) or die ("Couldn't get count"); // Present results based on validity if ($num ==0) { echo "You are not authorised!"; } RESPONSE from server Server error! Error message: malformed header from script. Bad header=HTTP/1.0 401 Unauthorised: php.exe If you think this is a server error, please contact the webmaster Error 500 192.168.3.31 07/22/02 12:29:04 reetu --------------------------------- Do You Yahoo!? Yahoo! Health - Feel better, live better