<?php

require_once("head2Alt.php");

if($_POST["submit"])
{
   //require("buda_connect.php");
  // $con = new connect_class();

     $hnm=$_POST['hiD'];   $ownID=$_POST['owniD'];  
     
  
     $email=$_POST['email']; 

     $phoneno=$_POST['phoneno']; 

     $pobox=$_POST['pobox'];

     $street=$_POST['street'];

     $ward=$_POST['ward'];

     $district=$_POST['district'];

     $region=$_POST['region'];

     $country=$_POST['country'];

     $popularDistination=$_POST['popularDistination'];

     $hname=$_POST['hname'];
     $ownID=$_POST['owniD']; 
     $hnm=$_POST['hiD']; 
   
     
   if(!$con->vPopularDistination($popularDistination) || !$con->vStreet($street) || !$con->vHname($hname) || !$con->vWard($ward) || !$con->vDistrict($district) || !$con->vRegion($region) || !$con->vCountry($country) || !$con->vPhoneno($phoneno) || !$con->vEmail($email))
         
      {

        require("repostEditHotelProfileForm.php");
      }
   else
      {
	     if(isset($_POST['hiD']) && isset($_POST['owniD']))
           {

       require("successEditHotelProfileForm.php");
           }
      }

 
     }
else 
     {
	echo "Error occured when saving data!..";
     }

 
require_once('footerIn.php');
?>
