Forum Moderators: coopster
Parse error: parse error, unexpected T_STRING in blah/blah on line 18
Anyway, I think that this error is somewhere in this switch statement. I have commented line 18.
switch (@$_POST['Button'])
{
case "Login":
$cxn = Connect_to_db("blah.inc");
$sql = "SELECT user_name FROM $table_name
WHERE user_name='$_POST[blahname]'";
$result = mysqli_query($cxn, $sql)
or die("Couldnt execute query 1.");
$num = "mysqli_num_rows($result);
if ($num == 1)
{
<!-- the next line is #18 //-->
$sql = "SELECT user_name FROM $table_name
WHERE user_name='$_POST[blah]'
AND password=md5('$_POST[password]')";
$result2 = mysqli_query($cxn, $sql)
or die("Couldnt execute query 2.");
$row = mysql_fetch_assoc($result2);
if ($row)
{
$_SESSION['blah']="yes";
$_SESSION['logname'] = $_POST['blahname'];
header("Location: $next_program");
}
else
{
$message_1="The Login Name, '$_POST['blahname']'
excist, but you have not entered the correct password!
Please try again.<br />";
extract ($_POST);
include("fields_login.inc");
include("registerForm.inc");
}
}
elseif ($num == 0)
{
$message_1="The User Name you entered does not excist! Please try again.<br />";
include("blah.inc");
include("blah.inc");
}
break;