kwangqaz

Edit.php

Aug 23rd, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.88 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Railay Viewpoint Resort</title>
  4. </head>
  5. <body>
  6.  
  7. <?php
  8.    ini_set('display_errors', 1);
  9.    error_reporting(~0);
  10.  
  11.    $hostname = "localhost";
  12.    $username = "admin2";
  13.    $password = "012757957";
  14.    $dbname = "customer";
  15.  
  16.    $strrt_id = null;
  17.  
  18.    if(isset($_GET["rt_id"]))
  19.    {
  20.        $strrt_id = $_GET["rt_id"];
  21.    }
  22.  
  23.  
  24.    $conn = mysqli_connect ($hostname, $username, $password, $dbname);
  25. mysqli_set_charset($conn, "utf8");  
  26.  
  27.  
  28.    $sqli = "SELECT * FROM rt_room WHERE rt_id = '".$strrt_id."' ";
  29.  
  30.   $dbquery = mysqli_query($conn,$sqli);
  31.  
  32.  
  33. ?>
  34.  
  35.  
  36. <form action="save_edit.php" name="frmAdd" method="post">
  37. <table width="350" border="1">
  38. <h4 style="color:#000000;" align="left">แก้ไขข้อมูลห้องพัก</h4>
  39.  
  40.  
  41.      <tr>
  42.     <th width="500">รหัสห้องพัก</th>
  43.     <td><input type="text" name="rt_id" size="20" value="<?php echo $result["rt_id"];?>"></td>
  44.     </tr>
  45.   <tr>
  46.     <th width="500">ชื่อห้องพัก</th>
  47.     <td><input type="text" name="rt_name" size="20" value="<?php echo $result["rt_name"];?>"></td>
  48.     </tr>
  49.   <tr>
  50.     <th width="500">ราคา</th>
  51.     <td><input type="text" name="txt rt_price" size="20" value="<?php echo $result["rt_price"];?>"></td>
  52.     </tr>
  53.   <tr>
  54.     <th width="500">รายละเอียดห้องพัก</th>
  55.     <td><input type="text" name="txtrt_detail" size="20" value="<?php echo $result["rt_detail"];?>"></td>
  56.     </tr>
  57.  
  58.     <th width="120">รูปภาพ</th>
  59.     <td><input type="typeImg" name="rt_image"
  60.     value="<?php echo $result["rt_image"];?>">
  61.     <div class="form-group">
  62.     <input type="file" name="typeImg" >
  63.      </div></div></td>
  64.      
  65.  
  66.   </table>
  67.   <input type="submit" name="submit" value="ยืนยันการแก้ไข">
  68. </form>
  69.  
  70. <?php
  71. mysqli_close($conn);
  72. ?>
  73. </body>
  74. </html>
Add Comment
Please, Sign In to add comment