这就是我所拥有的,我该怎么办?我想在一个会话中存储两个变量,它们是用户名和头像。
if ($count == 1)
{
$row = mysqli_fetch_array($result);
//while ($_SESSION['username'] = $row['username'])
$_SESSION['users'] = [''];
$_SESSION['users']['username'] = $row['username'];
$_SESSION['users']['avatar'] = $row['avatar'];
{
session_start();