
<?php
session_start();
include("include/dbconnect.php");
extract($_POST);
$msg="";
if(isset($register))
	{
		
		$qry=mysql_query("select * from register where secretkey='".$secretkey."' ");
		$num=mysql_num_rows($qry);
			if($num==1)
			{
			$_SESSION['uname']=$uname;
			header("location:login.php");
			}
			else
			{
			$msg="Invalid Key!";
			}
	}
?>
<html>
<head>
<title><?php include("include/title.php"); ?></title>
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {
	color: #990000
}
-->
</style>
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon">
	

    <link rel="apple-touch-icon" href="../images/apple-touch-icon.png">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <!-- Site CSS -->
    <link rel="stylesheet" href="../css/style.css">
    <!-- Responsive CSS -->
    <link rel="stylesheet" href="../css/responsive.css">
    <!-- Custom CSS -->
    <link rel="stylesheet" href="../css/custom.css">
<script language="javascript">
function validate()
{

	if(isNaN(document.form1.credit.value))
	{
	alert("Invalid Credit Card No..!");
	document.form1.credit.select();
	return false;
	}
	if(document.form1.credit.value=="")
	{
	alert("Enter the Credit Card No...");
	document.form1.credit.focus();
	return false;
}
return true;	
}
</script>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
     <header class="main-header">
        <!-- Start Navigation -->
        <nav class="navbar navbar-expand-lg navbar-light bg-light navbar-default bootsnav">
            <div class="container">
                <!-- Start Header Navigation -->
                <div class="navbar-header">
                    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-menu" aria-controls="navbars-rs-food" aria-expanded="false" aria-label="Toggle navigation">
                    <i class="fa fa-bars"></i>
                </button>
                    <a class="navbar-brand" href="index.html"><img src="images/logo.png" class="logo" alt=""></a>
                </div>
                <!-- End Header Navigation -->

                <!-- Collect the nav links, forms, and other content for toggling -->
				  <div class="collapse navbar-collapse" id="navbar-menu">
                    <ul class="nav navbar-nav ml-auto" data-in="fadeInDown" data-out="fadeOutUp">
                        <li class="nav-item active"><a class="nav-link" href="../index.html">Home</a></li>
                        <li class="nav-item"><a class="nav-link" href="login.php">Admin</a></li>
                        
                        <li class="nav-item"><a class="nav-link" href="login.php">User</a></li>
                        <li class="nav-item"><a class="nav-link" href="register3.php">CreateAccount</a></li>
                    </ul>
                </div>
                <!-- /.navbar-collapse -->

                <!-- Start Atribute Navigation -->
                
                <!-- End Atribute Navigation -->
            </div>
            <!-- Start Side Menu -->
            
            <!-- End Side Menu -->
        </nav>
        <!-- End Navigation -->
    </header>
	
	<div  style="background-image:url(../images/bg3.jpg);height:50%; text-align: center;">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <h2>New Account Create</h2>
                    <ul class="breadcrumb">
                        <li class="breadcrumb-item"><a href="#">Home</a></li>
                        <li class="breadcrumb-item active"> Account Create </li>
                    </ul>
                </div>
            </div>
        </div>
    <tr>
      <td align="center"><p>&nbsp;</p>
        <p class="style1 style2"><?php echo $msg; ?></p>
        <table width="405" height="360" border="0" cellpadding="0" cellspacing="0">
		
          
          <tr>
            <td colspan="2" align="center"><strong>Enter SecretKey  </strong></td>
          </tr>
		  <tr>
            <td width="162">SecretKey </td>
            <td width="162"><input type="password" name="secretkey" class="form-control"></td>
          </tr>
          
          <tr>
            <td colspan="2" align="center"><input type="submit" name="register" value="Register" onClick="return validate()" class="btn hvr-hover" />
            <input type="reset" name="Reset" value="Clear" class="btn hvr-hover"></td>
          </tr>
        </table>
        <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p></td>
    </tr>
    <tr>
      <td align="center" >&nbsp;</td>
    </tr>
  </table>
 <div class="footer-copyright">
        <p class="footer-company">&nbsp;</p>
    </div>
    <!-- End copyright  -->
</form>
</body>
 <!-- ALL JS FILES -->
    <script src="../js/jquery-3.2.1.min.js"></script>
    <script src="../js/popper.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>
    <!-- ALL PLUGINS -->
    <script src="../js/jquery.superslides.min.js"></script>
    <script src="../js/bootstrap-select.js"></script>
    <script src="../js/inewsticker.js"></script>
    <script src="../js/bootsnav.js."></script>
    <script src="../js/images-loded.min.js"></script>
    <script src="../js/isotope.min.js"></script>
    <script src="../js/owl.carousel.min.js"></script>
    <script src="../js/baguetteBox.min.js"></script>
    <script src="../js/form-validator.min.js"></script>
    <script src="../js/contact-form-script.js"></script>
    <script src="../js/custom.js"></script>
</html>
