0

I've written a really basic login page, yet I keep getting a Parse Error message on line 36! Which happens to be the very last line of the whole code! Any suggestions on how I can get this to would be greatly appreciated!

<?php
 $page_title = 'Login';
 if (isset($_POST['library']))
 {
  require_once (mysqli_connect.php);
  if (!empty($_POST['library']))
  {
   $l = mysqli_real_escape_string ($dbc, $_POST['library']);
  }
  else
  {
   $l = FALSE;
   echo '<p class="error">You forgot to enter your Library ID Number!</p>';
  }
  if ($l)
  {
   $q = "SELECT borname FROM borrower WHERE (library='$l')";
   $r = mysqli_query ($dbc, $q) or trigger_error("Query: $q\n<br/>MySQL Error: " . mysql_error($dbc));
   
   if (@mysqli_num_rows($r) == 1) 
   {
    $_SESSION = mysqli_fetch_array ($r, MYSQLI_ASSOC);
	mysqli_free_result($r);
	mysqli_close($dbc);
	$url = BASE_URL . 'index.php';
	ob_end_clean();
	header("Location: $url");
	exit();
   }
   else
   {
    echo '<p class="error">Please try again.</p>';
   }
  mysqli_close($dbc);
  }
?>

Thanks!

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by wdms
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.