[EMAIL PROTECTED] (Hawk) wrote in <[EMAIL PROTECTED]>:
Hi Hawk, Here is a snippet of what I use: if (isset( $txtUsername )) { $sql = "Select a.* from admins a where "; $sql .= "adm_name = '$txtUsername' "; $sql .= "and adm_pwd = PASSWORD('$txtPassword')"; $resultID = mysql_query( $sql ) or die("Error in Query: $query " . mysql_error()); $row = mysql_fetch_assoc( $resultID ); $num = mysql_num_rows( $resultID ); if ( $num != 0 ) { $auth = true; session_start(); session_register("Admin_ID"); session_register("Admin_Name"); session_register("is_auth"); $Admin_ID = $row["AdminID"]; $Admin_Name = $row["adm_name"]; $is_auth = $auth; } mysql_free_result($resultID); } if ( ! $auth ) { error_reporting($err_lvl); $is_auth = $auth; header("Location:logon.php"); exit; } else { header("Location:adminindex.php"); exit; } ?> Hope this helps. Chris -- 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]