<?php

require_once("head2Alt.php");

if($_POST["submit"])
{ 
   $roomid=$_POST['roomid'];   $rname=$_POST['rname'];  $hnm=$_POST['hiD'];

   $rtype=$_POST['rtype'];  $rcost =$_POST['rcost']; $ownID=$_POST['owniD'];
 
  
   if($con->vRname($rname) && $con->vRtype($rtype) && $con->vRcost($rcost) && $con->vRroomid($roomid))
      {
       require("successEditRoomPro.php");

      }
   else
      {
	     if(isset($_POST['hiD']) && isset($_POST['owniD']))
           {

            require("repostEditRoomForm.php");
           }
      }

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

 
require_once('footerIn.php');
?>
