Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

query-data-from mysql and php

<?php 
                            $sql = "SELECT * FROM `users`";
                            $result = mysqli_query($conn, $sql);
                            // fetch all users
                            $users = mysqli_fetch_all($result, MYSQLI_ASSOC);
                            ?>
                            <!-- A single user -->
                            <?php foreach ($users as $user): ?>
                                <tr>
                                    <td><?php echo $user['id'] ?></td>
                                    <td><?php echo $user['Name'] ?></td>
                                    <td><?php echo $user['Email'] ?></td>
                                    <td> <span id="user_current_status"></span></td>
                                </tr>
                            <?php endforeach; ?>
                            <!-- A single user -->
Source by raw.githubusercontent.com #
 
PREVIOUS NEXT
Tagged: #mysql #php
ADD COMMENT
Topic
Name
8+2 =