<?php
session_start();

if(isset($_POST['clerk']) && isset($_POST['departure']) && isset($_POST['arrival']) && isset($_POST['dai']) && isset($_POST['bodmonth']) && isset($_POST['bodyear']) && isset($_POST['no_night']) && isset($_POST['no_guest']) && isset($_POST['rono']) && isset($_POST['cust_id']) && isset($_POST['hotelid'])){

$cle =$_POST['clerk']; $depart =$_POST['departure'];  $arriv =$_POST['arrival']; $day =$_POST['dai'];  $bm =$_POST['bodmonth']; $by =$_POST['bodyear'];  $nn =$_POST['no_night']; $ng =$_POST['no_guest']; $cusid =$_POST['cust_id']; $hid =$_POST['hotelid'];

$date=$by."-".$bm."-".$day;

$rec=Date("Ymdhis");

$checkin=Date("hh:mm:ss");

$tra=Date("Y-m-d");
 
 include("buda_connect.php");
 
mysql_query("insert into recept(recept_no, hotel_id, cust_id, room_id, arrived_on, arivedf,departure_on, departure_to,no_of_night,nofguest,clerksign)

 values('$rec','$hid','$cusid','$rm','$tras','$arriv','$date','$depart','$nn','$ng','$cle')") or die("Error : ".mysql_error());
 
}else{
echo"You have posted some empty value";
}
?>