<?php
// Display Errors
error_reporting(E_ALL);
$username = $_POST['username'];
$password = $_POST['password'];
$adminid = $_POST['adminid'];
if ($username&&$password&&$adminid)
{
$connect = mysql_connect("localhost", "usernamehere", "passwordhere") or die("Error connecting to Database. Please notify an administrator.");
mysql_select_db("databaase_ishere") or die("DB not found");
$query = mysql_query("SELECT * FROM usersauto WHERE username='$username'");
$numrows = mysql_num_rows($query);
if ($numrows!=0)
{
// code to log in
while ($row = mysql_fetch_assoc($query))
{
$dbusername = $row['username'];
$dbpassword = $row['password'];
$dbadminid = $row['adminid'];
}
// check to see if they match
if ($username==$dbusername&&$password==$dbpassword&&$adminid==$dbadminid)
{
echo "You have been successfully logged in!";
}
else
echo "Incorrect password!";
}
else
die("User does not exist in the database.")
}
[B]?>[/B]
I am getting the error from Aurora (really new Firefox Beta) that is:
Parse error: syntax error, unexpected $end in public_html/SandboxItems/login.php on line 46
Line 46 is in bold.
Any help would be greatly appreciated, as I am quite new to PHP coding.