<?php
session_start();
 
 
if( isset($_POST['logname']) && isset($_POST['logsecret'])){
 
 
$name=$_POST['logname'];

$secret=$_POST['logsecret'];
 include("buda_connect.php");
 
 
 
 
 
 
 $valid=mysql_query("select owner_id from owner_credential where  username= '$name' and secret_no='$secret'") or die("Error:".mysql_error());

$no=mysql_num_rows($valid);

if($no>0){
	$re = array();
	
	$outD = mysql_fetch_array($valid);
	
	array_push($re,array( 'owner_id'=>$outD[0]
	                       
	                       ));   
						   
						   





$chCate=mysql_query("select own_regno,fname,mname, lname, btown_dist,bstreet_vil,email,rtown,rstreet from account_owner where owner_id='$outD[0]'") or die("Error:".mysql_error());

$ownO=mysql_num_rows($chCate);
if($ownO>0){
	$ownpro=array();
	
	$OwnD=mysql_fetch_array($chCate);
	
	array_push($ownpro, array('own_regno'=>$OwnD[0],
	                          'fname'=>$OwnD[1],
							  'mname'=>$OwnD[2],
							  'lname'=>$OwnD[3],
							  'btown_dist'=>$OwnD[4],
							  'bstreet_vil'=>$OwnD[5],
							  'email'=>$OwnD[6],
							  'rtown'=>$OwnD[7],
							  'rstreet'=>$OwnD[8]
	));
	
$hotel=mysql_query("select hotel_id,hname,ltown_city,lstreet_vil,paddress,email,reg_date from hotel where owner_id='$OwnD[0]'")or die("Error:".mysql_error());

$hotno=mysql_num_rows($hotel);

if($hotno>0){
	
	 $gethoD = array();
	 
	 $OuthD=mysql_fetch_array($hotel);
	 
	 array_push($gethoD,array('hotel_id'=>$OuthD[0],
	                         'hname'=>$OuthD[1],
							 'ltown_city'=>$OuthD[2],
							 'lstreet_vil'=>$OuthD[3],
							 'paddress'=>$OuthD[4],
							 'email'=>$OuthD[5],
							 'reg_date'=>$OuthD[6]
							  
	             
				 ));
 
 
  
	 
	?>
	<html>
<body>
<blockquote><blockquote>
HOTEL PROFILE
<table  class="protab" border=1>
 
<tr id="tdprof" ><td>Hotel Name</td><td colspan=2><?php echo $OuthD[1] ;?></td> </tr>

<tr ><td rowspan =2>Location</td><td>District</td><td>Street</td></tr>

<tr id="tdprof" ><td><?php echo $OuthD[2];?></td><td><?php echo $OuthD[3];?></td></tr>
 
 
 
 <tr id="tdprof" ><td >Email Address</td> <td>Physical Address</td><td>Registration date</td></tr>
 
  <tr id="tdprof" ><td ><?php echo $OuthD[5];?></td> <td><?php echo $OuthD[4];?></td><td><?php echo $OuthD[6];?></td></tr>
 
</table></blockquote></blockquote>
</body>
</html>
	
	<?php
}
}
}
}

 

	
?>
