mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-01-06 14:56:00 +00:00
17 lines
346 B
PHP
17 lines
346 B
PHP
<?php
|
|
/*
|
|
Get full user info from database
|
|
|
|
Returns array with user info
|
|
*/
|
|
function get_user_info($conn, $id) {
|
|
// Setting SQL query
|
|
$sql = "SELECT * FROM users WHERE id = ".$id;
|
|
// Getting results
|
|
$query = mysqli_query($conn, $sql);
|
|
// Fetching associated info
|
|
$user_array = mysqli_fetch_assoc($query);
|
|
|
|
return($user_array);
|
|
}
|