$_SESSION['user_id'] = $row['user_id'];
Then, in another page that needs this information, just reference the same reference variable:
$result = mysqli_query($con, "SELECT * FROM users WHERE user_id = $_SESSION['user_id']");
you do not. you need to use the database to look them up.