Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $server = "localhost";
- $username = "root";
- $password = "";
- $name = "login_system";
- $con = mysqli_connect("localhost","username","","loginsystem");
- if (mysqli_connect_errno())
- {
- echo "Failed to connect to MySQL: " . mysqli_connect_error();
- }
- ?>
- <?php
- include'dbh.php';
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title> It is index 3</title>
- </head>
- <body>
- <?php
- global $con;
- $sql = "SELECT * FROM users;";
- $result = mysqli_query($con,$sql );
- $resultCheck = mysqli_num_rows($result);
- if ($resultCheck > 0){
- while($row = mysqli_fetch_assoc(result)){
- echo $row['useruid'] . "<br>";
- }
- }
- ?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment