query data from mysql and php

Solutions on MaxInterview for query data from mysql and php by the best coders in the world

showing results for - "query data from mysql and php"
Manuel
25 Mar 2016
1<?php 
2                            $sql = "SELECT * FROM `users`";
3                            $result = mysqli_query($conn, $sql);
4                            // fetch all users
5                            $users = mysqli_fetch_all($result, MYSQLI_ASSOC);
6                            ?>
7                            <!-- A single user -->
8                            <?php foreach ($users as $user): ?>
9                                <tr>
10                                    <td><?php echo $user['id'] ?></td>
11                                    <td><?php echo $user['Name'] ?></td>
12                                    <td><?php echo $user['Email'] ?></td>
13                                    <td> <span id="user_current_status"></span></td>
14                                </tr>
15                            <?php endforeach; ?>
16                            <!-- A single user -->