<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
	background-color: #660033;
}
.style3 {
	color: #FFFFFF;
	font-size: xx-large;
}
.style4 {color: #FFFFFF}
.style5 {font-size: x-large}
.style6 {color: #FFFFFF; font-size: x-large; }
.style7 {font-size: xx-large}
.style9 {font-size: xx-large; color: #FF0000; }
-->
</style>
</head>

<body>

<p align="center"><img src="../ssssssss.png" width="243" height="178" /><span class="style9">Concert Reservation and Bookings </span></p>
<p align="center" class="style3"><span class="style7">L</span>og In </p>
<table width="298" height="100" border="1" align="center">
  <tr>
    <td><form id="form1" name="form1" method="post" action="">
      <label>
      <div align="center"><span class="style6">Username:
        </span>
          <span class="style5">
          <input type="text" name="user" />
        </span></div>
      </label>
      <p align="center" class="style4"><span class="style5">Password:</span>
        <label>
        <input type="text" name="pass" />
        </label>
      </form>
  
      <div align="center">
        <p>
          <input type="submit" name="Submit" value="Log in" />
        </p>
        <p>
		 <?php
  if (isset($_POST["Submit"])){
   $lastname= $_POST['lastname'];
  $lastname= $_POST['firstname'];
  $lastname= $_POST['contact'];
  $lastname= $_POST['address'];
  $user= $_POST['user'];
  $pass= $_POST['pass'];
  $con=mysql_connect('localhost','root','') or die(mysql_error());
  mysql_select_db('concert') or die ("cannot select DB");
  
  $query =mysql_query ("Select * FROM concert WHERE USERNAME='".$user."' AND Password='".$pass."'");
  $numrows=mysql_num_rows($query);
  if ($numrows !=0)
  {
  while ($row=mysql_fetch_assoc($query))
  {
  $dbusername=$row['Username'];
  $dbpassword=$row['Password'];
  }
  
  if ($user == $dbusername && $pass == $dbpassword)
  {
  session_start();
  $_SESSION['sess_user']=$user;
  
  /* Redirect browser*/
  
  header('Location: member.php');
  }
  
 }else {
 echo "Invalid Username or Password!";
 }
 }
 
 ?>&nbsp;</p>
      </div>
      <form id="form2" name="form2" method="post" action="">
    <label></label>
  </form>
  
</body>
</html>
