
<?php
	$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
	mysql_selectDB("wauhaha_karaoke",$login);
		

	$RID=$_GET['RID'];
	$result = mysql_query("select * from roomtype where RID='$RID'");
	$r = mysql_fetch_array($result);
	$rt = $r['roomtype'];
	$query=mysql_query("delete from roomtype where RID='$RID'");
	$query=mysql_query("delete from room where roomtype='$rt'");
	echo "<script language=javascript>alert('Delete successful!!');window.location='http://www.wauhaha.com/karaoke/roomtype.php'</script>";

?>
