<?php
$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
	mysql_selectDB("wauhaha_karaoke",$login);
	
$package = $_POST["package"];
$price = $_POST["price"];
echo $package;
echo $price;

if(($package =="")||($price =="")){
		echo "<script language='javascript'>alert('Please Fill In Completely.')</script>";
		echo "<script language='javascript'>window.location='addroomtype.php'</script>";

}else{

$query =mysql_query("INSERT INTO package(package,price)VALUES('$package','$price')");
if($query){		
		echo "<script language='javascript'>alert('Add package Successful.')</script>";
		echo "<script language='javascript'>window.location='viewpackage.php'</script>";
		}else{
		echo "<script language='javascript'>alert('Add package Failed.')</script>";
		echo "<script language='javascript'>window.location='viewpackage	.php'</script>";
		
		}
	}