<body style="background-color: #ffffff;background-image:url(rail.jpg);background-repeat: repeat-y">
<center>
<?php
include('link.php');

?>
</center>

<?php 

	$keyword=$_POST["mems"];
	
	
	if($keyword ==""){
	echo "<script language=javascript>alert('Please Insert Ic Number!!');window.location='JavaScript:window.close()'</script>";
	}
	$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
	mysql_selectDB("wauhaha_karaoke",$login);	

?>
<?php

$query=mysql_query("select * from regmember where ic  like '%$keyword%'  ");
			if(mysql_num_rows($query)==0){
				echo "<center>No results<br><a href=http://www.wauhaha.com/karaoke/adminviewmem.php>Back to my menu</a></center>";die();
			}
			else{
			echo "<table border=1 align=center style ='font-family:Arial, Helvetica, sans-serif;font-size:1em' color='blue' bordercolorlight='tan' cellspacing=0 cellpadding=4>
 <tr bgcolor=lightblue ><th>Username</th>
						<th>Password</th>
						<th>Name</th>
						<th>Gender</th>
					
						<th>BDay</th>
						<th>Address1</th>
						<th>Postcode</th>
						<th>IC</th>
						<th>Email</th>
						<th>Phone</th>
						<th>HPhone</th>
						<th colspan=3>Function</th>
						</tr>";


while($row2 = mysql_fetch_array($query)){
  $username=$row2['Username'];
  
  echo"<tr align='center'>";
	
  echo "<td border=1>".$row2['Username']."</td>";
  echo "<td border=1>".$row2['Password']."</td>";
  echo "<td border=1>".$row2['Name']."</td>";
  echo "<td border=1>".$row2['Gender']."</td>";

  echo "<td border=1>".$row2['BDay']."</td>";
  echo "<td border=1>".$row2['Address1']."</td>";
  echo "<td border=1>".$row2['Postcode']."</td>";
  echo "<td border=1>".$row2['IC']."</td>";
  echo "<td border=1>".$row2['Email']."</td>";
  echo "<td border=1>".$row2['Phone']."</td>";
  echo "<td border=1>".$row2['HPhone']."</td>";
  echo "<td border=1><a href=http://www.wauhaha.com/karaoke/admindelmem.php?MemID=$MemID /><img src=delete.png width=20 height=20></a></td>";
  echo "<td border=1><a href=http://www.wauhaha.com/karaoke/admineditmem.php?MemID=$MemID /><img src=edit.jpg width=20 height=20></a></td>";
  echo "<td border=1><a href=http://www.wauhaha.com/karaoke/adminaddcredit.php?MemID=$MemID /><img src=add.jpg width=20 height=20></a></td>";
  echo "</tr>";
 
  }
  echo "</table>";
	}
		
?>
</body>
</html>