Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo "<center>";
- $data=array("Room_id          ","Floors              ","Price                ","Single/Double","Room Type      ","Room Type      ");
- $data1=array("text1","text2","text3","text4","text5","text6");
- $con=mysqli_connect("localhost","root","","hotel");
- if($con!=null)
- echo"Sucess";
- $result=mysqli_query($con,"SELECT * FROM room WHERE Room_id=".$_POST['id']." ");
- if(!$result)
- die("connot");
- while($row=mysqli_fetch_array($result,MYSQLI_NUM))
- {
- echo "<form name='form' method='post' action='update3.php'>";
- for ($i=0; $i < 5 ; $i++)
- {
- if($i==0)
- {
- echo $data[$i]."<input type='text' value='".$row[$i]."' name='$data1[$i]' disabled><br><br>";
- echo '<input type="hidden" name="id" value="'.$row[0].'">';
- }
- else
- echo $data[$i]."<input type='text' value='".$row[$i]."' name='$data1[$i]'><br><br>";
- }
- echo"<input type='submit' name='submit' value='update'>";
- echo "</form>";
- }
- echo "</center>";
- ?>
Add Comment
Please, Sign In to add comment