<HTML>
<BODY>
<?
// Login.php
include(“DBPARAM.php”);
// connect to database
mysql_connect($hostname,$userName,$password) or die(“Error connecting to MySQL Server”);
mysql_select_db($database) or die(“Error selecting database”);
// get data from FORM – Login.html
$usrName = $_REQUEST[“txtusername”];
$usrPassword = $
$sql = “SELECT * FROM STAFF_PWD WHERE staff_id=’$usrName’ AND staff_pwd=’$usrPassword'”;
// execute the SQL statement and get the result
$result = mysql_db_query($database,$sql) or die(“Error running SQL”);
// calculate number of records (row)
$row = mysql_num_rows($result);
?>
<?
if ( $row <= 0 ) { ?>
<p><font face=”Arial” color=”#FF0000″>Invalid username and/or password.</font></p>
<p><font face=”Arial” color=”#FF0000″><a href=”Login.html”>Please click here to
try again.</a></font></p>
<? }
else
{
header(“Location:Filename.html”);
}
?>
<? mysql_close(); ?>
</BODY>
</HTML>
//————
i am getting a blank page if i execute the login page. is there anything wrong with my coding??