Jump to content
Larry Ullman's Book Forums

rajeshkhare

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by rajeshkhare

  1. Please help me I am also getting the warning on above quote as mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\Mypractice\Old practice file\edit.php.php on line 20
  2. <?php //reading the database $conn=mysqli_connect ("localhost", "root", ""); if (!$conn) { echo "server connction error"; } $db_conn = mysqli_select_db($conn, "test2"); $sql = "select id, name, email, passwd from f_user"; $query = mysqli_query($conn, $sql); ?> <table> <tr> <td><strong>username</strong></td> <td><strong>email</strong></td> <td><strong>Passwd</strong></td> <td><strong>Action</strong></td> </tr> <?php if (mysqli_num_rows($query)>=1){ while ($row=mysqli_fetch_assoc($query)){ ?> <tr> <td><?php echo $row['name'];?></td> <td><?php echo $row['email'];?></td> <td><?php echo $row['passwd'];?></td> <td><a href="edit.php?id=<?php echo $row['id'];?>"> Edit</a> I <a href ="delete.php?id=<?php echo $row['id']; ?>">Delete</a></td> </tr> <?php }} ?> </table>
×
×
  • Create New...