<?php
include("sessionLogin.php");
include("connect.php");
$user=$_SESSION['client'];

$query=mysql_query("select * from customer where userID='$user'");
$display=mysql_fetch_array($query);
$gender=$display['gender'];
$birth=$display['birthday'];

$day=substr($birth,0,2);
$month=substr($birth,3,2);
$year=substr($birth,6,4);
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="website.css" />
<style>
.styled-select select {
   background: transparent;
   width: 100px;
   padding: 3px;
   font-size: 12px;
   border: 1px solid #ccc;
   height: auto;
}
.styled-select1 select {
   background: transparent;
   width: 50px;
   padding: 3px;
   font-size: 12px;
   border: 1px solid #ccc;
   height: auto;
}
.styled-select2 select {
   background: transparent;
   width: 60px;
   padding: 3px;
   font-size: 12px;
   border: 1px solid #ccc;
   height: auto;
}
.styled-select3 select {
   background: transparent;
   width: 80px;
   padding: 3px;
   font-size: 12px;
   border: 1px solid #ccc;
   height: auto;
}
</style>
</head>
<body class="client">
<h2>Update your other information</h2>
<a href="account.php"><< Back</a>
<table class="inner2" style="background-color:#EFEFEF" width=80%>
<tr>
	<td><h3>Enter your new information</h3>
	<form action="updatingInfo.php" method="POST" onsubmit="return finalcheck()">
		<table cellpadding=5 border=0>
		<tr>
			<td>Gender :</td>
			<td>
			<div class="styled-select">
			<select name="gender">
			<?php 
				if($gender=="male"){
					echo "<option value='male' selected>Male</option>";
					echo "<option value='female'>Female</option>";
				}else if($gender=="female"){
					echo "<option value='male'>Male</option>";
					echo "<option value='female' selected>Female</option>";
				}
			?>
			</select>
			</div></td>
		</tr>
		<tr>
			<td>Birthday :</td>
			<td>
			<table cellspacing=0>
			<tr><td>
			<div class="styled-select1">
			<select name="day">
			<?php
			for($i=1;$i<32;$i++){
				if($day==$i){
					echo "<option value=$i selected>$i</option>";
				}else{
					echo "<option value='$i'>$i</option>";
				}
			
			}
			
			?>
			</select>
			</div>
			</td><td>
			<div class="styled-select2">
			<select name="month">
			<?php
			for($i=1;$i<13;$i++){
				if($month==$i){
					echo "<option value=$i selected>$i</option>";
				}else{
					echo "<option value=$i>$i</option>";
				}	
			}
			?>
			</select>
			</div>
			</td><td>
			<div class="styled-select3">
			<select name="year">
			<?php
			for($i=1905;$i<2012;$i++){
				if($year==$i){
					echo "<option value=$i selected>$i</option>";
				}else{
					echo "<option value=$i>$i</option>";
				}
			}
			?>
			</select>
			</div>
			<div id="pass1field"></div>
			</td></tr>
			</table>
			</td>
			</tr>
		<tr>
			<td colspan=2><input type="submit" value="Submit" style="background-color:#4f85bb;width:100;height:30;font-weight:bolder;color:#fff"/></td>
			</tr>
			</table>
		</form>
	
	</td>
	</tr>
	</table>



</body>
</html>