Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con=mysqli_connect("localhost","root","","hotel");
- if($con!=null)
- echo"Sucess";
- $result=mysqli_query($con,"SELECT * FROM room");
- if(!$result)
- die("connot");
- else
- {
- $data=array("Room_id","Floors","Price","SD","Room_Type",);
- echo'<table border="1">';
- echo '<tr>';
- for ($i=0; $i < 5; $i++)
- echo '<td>'.$data[$i].'</td>';
- echo "<td>".'update'."</td>";
- echo '</tr>';
- }
- while($row=mysqli_fetch_array($result,MYSQLI_NUM))
- {
- echo '<form name="frmDelete'.$row[0].'" method="post" action="edit.php">';
- echo '<tr>';
- for($i=0;$i<5;$i++)
- echo'<td>'.$row[$i].'</td>';
- echo '<input type="hidden" name="id" value="'.$row[0].'">';
- echo '<td><input name="smtDelete" type="submit" value="update"></td>';
- echo '</tr>';
- echo '</form>';
- }
- echo "</table>";
- $result=mysqli_close($con);
- ?
Advertisement
Add Comment
Please, Sign In to add comment