<? require_once "application_top.php"; ?>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Bihar Blood Bank</title>

<? include ("include/header.php"); ?>

	<table id="containerTable" border="0">
	<tr>
		<td width="220">
		<? require "left.php";?>
		</td>
		
		<td width="500px;text-align:center;">
		
		<h1>Registration Status</h1>
		
		<?=$msg;?>
		



<?php
//mysqli_connect(host,username,password,dbname);
$con=mysqli_connect("localhost","sauranbe_donator","25011992","sauranbe_biharbloodbank");
// Check connection
if (mysqli_connect_errno())
  {
  echo "<div class=msg>Registration Error</div>  " . mysqli_connect_error();
  }


$sql="INSERT INTO users (fname, username, ipassword, gender, weight, email, ydob, bloodgroup, mobile, dayphone, state, city, how_often, suffered1, status)
VALUES
('$_POST[Name]','$_POST[username]','$_POST[Password]', '$_POST[Gender]', '$_POST[weight]', '$_POST[email]', '$_POST[ydob]', '$_POST[bloodgroup]', '$_POST[mobile]', '$_POST[dayphone]', '$_POST[state]', '$_POST[city]', '$_POST[how_often]', '$_POST[age_more_than_18]', '$_POST[i_agree]')";





if (!mysqli_query($con,$sql))
  {
  die('Error: ' . mysqli_error($con));
  }
echo "<div class=msg>Registration successful</div> ";
echo"<br/>"; 

?>
		
		<br>
	</div>
</div>
		
		</td>
		
		<td width="220" align="right">
		<? include "right.php";?>
		</td>
	</tr>
	</table>
	
<? include ("include/footer.php"); ?>