I am trying to search my database for a result, and display all the columns relating to that result. My connection to the database works fine, but I don't know how to print the result of my query.
I tried accessing it as an array, but it did not work. What I want is to be able to search the database for the username 'TEST', and to return the password, email and username (to check the username exists).
My current code is this
$user = mysqli_query($con,"SELECT * FROM user_list where username = '$username'");
print_r($user);
$username
is the username. It returns this
(
[current_field] => 0
[field_count] => 4
[lengths] =>
[num_rows] => 2
[type] => 0
)