<?php 

include("config.php");

$dresult=mysql_query("select * from hotel_service WHERE service_name='$_POST[service_name]' ");
$drow=mysql_fetch_array($dresult);

if($drow == ""){
	


mysql_query("INSERT INTO hotel_service (service_name, sprice) VALUES ( 
'$_POST[service_name]','$_POST[sprice]')");



	
header("location:add_service.php");
}else{
header("location:add_service.php?info=Service Name:  $_POST[service_name] is exist, Please use a new one. ");
	}
?>