keymasterviriya1150

update3

Apr 4th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. <?php
  2.        $con=mysqli_connect("localhost","root","","hotel");
  3.    /* if($con!=null)
  4.         echo"Sucess";*/
  5.     $result=mysqli_query($con,"SELECT * FROM room");
  6.      /*if(!$result)
  7.         die("connot");*/
  8.     $result=mysqli_query($con,"UPDATE room  SET Floors='".$_POST['text2']."',Price='".$_POST['text3']."',SD='".$_POST['text4']."', Room_Type ='".$_POST['text5']."' WHERE Room_id=".$_POST['id']."   ");
  9.    
  10.     if(!$result)
  11.         die("connotfuckyouuu");
  12.       else
  13.          echo"Congratulations The record is updated.";
  14.    $result=mysqli_query($con,"SELECT Floors,Price,SD,Room_Type FROM room ");
  15.  
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment