I am getting a Parse Error on the following ;
The line number shown for the parse error is after the </html> tag, so I'm guessing the problem is somewhere within the php code !!
Once other thing, I am using Dreamweaver to write and view my code, and when I type the line
if ($num > 0)
on the > it automatically changes from blue to black type - what could this be? Is this where the problem is?
thanks.........
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
session_start();
session_register('auth');
session_register('username');
require_once ('../mysql_connect.php'); //connect to the database
include ('header.php'); //show corporate header
include ('login_form.php');
$sql = "SELECT CLogIn FROM User
WHERE CLogIn='$fusername'";
$result = mysql_query($sql)
or die("Invalid Login.");
$num = mysql_num_rows($result);
if ($num == 1) //login name was found
{ $sql = "SELECT CLogIn FROM User
WHERE CLogIn='$fusername'
AND password=password('$fpassword')";
$result2 = mysql_query($sql)
or die("Invalid Login.");
$num2 = mysql_num_rows($result2);
if ($num2 > 0) // password is correct
{
header("Location: equipment.php");
// sends user to equipment list page
}
else // password is not correct
{
$message="The Login Name, '$fusername' exists,
but you have not entered the correct
password! Please try again.<br>";
header("index.php");
}
?>
</body>
</html>