M
M
mrnagaron2018-03-29 17:31:23
PHP
mrnagaron, 2018-03-29 17:31:23

How to find out the id of other users?

Hello, I have this script in my code

$link=mysqli_connect("localhost", "root", "", "test");
    $query = mysqli_query( $link, "SELECT * FROM `users`" );
    $userdata = mysqli_fetch_assoc($query);
       
echo "Номер: ".$userdata['user_id']."<br>\n";

He gets the user id from the database, but he gets exactly the id of 1 user how to make the rest?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2018-03-29
@mrnagaron

while($userdata = mysqli_fetch_assoc($query)){
 ...........
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question