<!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; }
.style5 {color: #FFFFFF}
.style6 {font-size: large}
.style8 {font-size: x-large}
.style9 {color: #FFFFFF; font-size: x-large; }
.style10 {color: #FF0000}
-->
</style>
</head>

<body>
<pre align="center" class="style3"><img src="../ssssssss.png" width="233" height="251" /><span class="style10">Concert Reservation And Bookings</span></pre>
<p align="left" class="style3">&nbsp; </p>
<p align="center" class="style3">Reservation Form </p>
<table width="693" height="254" border="1" align="center">
  <tr>
    <td><form id="form2" name="form2" method="post" action="">
      <label><span class="style9">LastName:
        </span></label>
      <span class="style6">
      <input type="text" name="lastname" />
      </span><span class="style9">
      Contact No.:
      </span>
      <span class="style8">
      <label><span class="style5">
      <input type="text" name="contact" />
      </span></label>
      </span>
      <p class="style8"><span class="style5">FirstName:
          <label></label>
      </span><label>
      <input type="text" name="firstname" />
        </label>
        <span class="style5">UserName:
        <label></label>
        </span>
        <input type="text" name="user" />
      </p>
      <p><span class="style9">Address:<span class="style8"><span class="style5">
        <input type="text" name="address" />
      </span></span>
          <label>          </label>
      </span>
        <span class="style8">
        <label></label>
        <span class="style5">Password:
        <label>        </label>
        </span></span><span class="style5"><label></label>
        </span><span class="style8">
        <input type="text" name="pass" />
        </span></p>
      <p class="style9"><span class="style6">Ticketing Categories &amp; Prices </span>:
        <label></label>
        <label>
        <select name="select">
          <option>VIP's (Php3,000)</option>
          <option>LOWER BOX (Php1,500)</option>
          <option>UPPER BOX (Php900)</option>
        </select>
        </label>
      </p>
      <p align="center"><span class="style5">      </span>
        <label>
        <input type="submit" name="Submit" value="Reserve" />
        </label>
        <label>
        <input type="submit" name="Submit2" value="Cancel" />
        </label>
      </p>
      <?php
  if(isset($_POST["Submit"])){
  $lastname= $_POST['lastname'];
  $first= $_POST['firstname'];
  $contact= $_POST['contact'];
  $address= $_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."'");
  $numrows=mysql_num_rows($query);
  if ($numrows==0)
  
  {
  
  $sql="INSERT INTO concert (FIRSTNAME,LASTNAME, ADDRESS, CONTACT,USERNAME, PASSWORD) VALUES ('$firstname','$lastname', '$address','$contact','$user','$pass')";
  
  $result=mysql_query($sql);
  
  if($result){
  echo "Account Succesfully Created.  Please click LOGIN now!";
  } else {
  echo "Failure!";
  }
  
  } else {
  echo "That username already exist! Please try again with another.";
  }
  }
  
      ?>
    </form>    </td>
  </tr>
</table>
<p align="left" class="style3">&nbsp;</p>
<form id="form1" name="form1" method="post" action=""><div align="left"><div align="center"><div align="left">
  <div align="center"><div align="right"><div align="left"><div align="center"></div>
          </div>
          </div>
        </div>
      
    </div>
    
  </div>
</div></form>
</body>
</html>
