Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (mysqli_num_rows($result) > 0 ) {
- while ($row = mysqli_fetch_array($result)) {
- // use a common name for variable so that your team can pick up your codes easier
- $id = $row['id'];
- $name = $row['name'];
- $phone = $row['phone'];
- // prepare your variable to avoid mixing quotes and concatenation
- echo "<tr>
- <td>
- <input type='hidden' name='id' value = '$id' />
- <input type='text' name= 'name' value= '$name' />
- </td>
- <td>
- <input type='text' name='phone' value = '$phone' / >
- </td>
- </tr>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement