<?php
require_once('head2Alt.php'); 
if(isset($_POST['post'])){
	if(isset($_POST['owniD'])){

		    $ownID=$_POST['owniD']; 
		    $HD=$con->getMyProfile($ownID);
		
        if($HD->rowCount()>0){
          $ro=$HD->fetch();
?>

<center>
<ul>
	<li>
		 <form action="editMyAccountProfilePro.php" method="post">
              <input class="hi" type="hidden" name="owniD"  value="<?php echo $ownID;?>">


              <input class="pos" type="submit" value="Edit profile info" name="post">

       </form>
	</li>

	<li>
		<form action="changeMyAccountPassword.php" method="post">
              <input class="hi" type="hidden" name="owniD"  value="<?php echo $ownID;;?>">


              <input class="pos" type="submit" value="Change password" name="post">

       </form>
	</li>



	<li>
		<form action="myAccountProfileImageForm.php" method="post">
              <input class="hi" type="hidden" name="owniD"  value="<?php echo $ownID;?>">


              <input class="pos" type="submit" value="Upload profile photo" name="post">

       </form>
	</li>

</ul>
<fieldset id="user_profile">
<table width="100%">
	<tr>
		<td colspan="4">
			
		</td>
	</tr>
	<tr>
		<td colspan="4" align="center" valign="top" height="40px">
		<label id="main_lab"> 
			<?php
			echo $ro['fname']." ".$ro['mname']." ".$ro['lname'];
			?>
		</label>
		</td>
	</tr>

	<tr>
		<td align="right" height="40px">
			<i>Account ID:</i>
		</td>

		<td align="left">
			<?php
			echo $ro['owner_id'];
			?> 
		</td>

		<td align="right">
			<i>Registration no:</i>
		</td>

		<td align="left" >
			<?php
			echo $ro['own_regno'];
			?>
		</td>
	</tr>

	<tr>
		<td align="right" height="40px">
			<i>Gender:</i>
		</td>

		<td >
			<?php
			echo $ro['gender'];
			?> 
		</td>

		<td align="right" >
			<i>Occupation:</i>
		</td>

		<td align="left">
			<?php
			echo $ro['occupation'];
			?> 
		</td>
	</tr>
 
	<tr>
		<td align="right" height="40px">
			<i>Phone no:</i>
		</td>

		<td align="left">
			<?php
			echo $ro['phoneno'];
			?>  
		</td>

		<td align="right">
			<i>Post address:</i>
		</td>

		<td align="left">
			<?php
			echo $ro['postAddress'];
			?> 
		</td>
	</tr> 
	<tr>
		<td align="right" height="40px">
			<i>Street:</i>
		</td>

		<td align="left" >
			<?php
			echo $ro['street'];
			?>  
		</td>

		<td align="right">
			<i>Ward:</i>
		</td>

		<td align="left">
			<?php
			echo $ro['ward'];
			?> 
		</td>
	</tr> 
	<tr>
		<td align="right" height="40px">
			<i>District/town:</i>
		</td>

		<td align="left">
			<?php
			echo $ro['district'];
			?>  
		</td>

		<td align="right">
			<i>Region/City:</i>
		</td>

		<td align="left">
			<?php
			echo $ro['city'];
			?> 
		</td>
	</tr> 
	<tr>
		<td align="right" height="40px">
			<i>Country:</i>
		</td>

		<td align="left">
			<?php
			echo $ro['country'];
			?>  
		</td>

		<td align="right">
			<i>Date of birth:</i>
		</td>

		<td align="left">
			<?php
			echo $ro['dob'];
			?> 
		</td>
	</tr> 
	<tr>
		<td align="right" height="40px">
			<i>Registration date:</i>
		</td>

		<td align="left" >
			<?php
			echo $ro['regdate'];
			?>  
		</td>

		<td align="right">
			<i>Email address:</i>
		</td>

		<td align="left">
			<?php
			echo $ro['email'];
			?> 
		</td>
	</tr>
	 
</table>
</fieldset>
</center>
<?php
}
else{
	echo "You are not registered";
}
}
}
 
require_once('footerIn.php');
?>
