Hello teachers, when I uploaded the picture, I made a user ID to pass the value,
$uid = $_SESSION['userid'];
echo $ uid; There is no problem with this, the variable can be output normally.
If I put this variable into the judgment, the value cannot be obtained.
if(!empty($_FILES['avatar_file']['tmp_name'])){
$uid = $_SESSION['userid'];
echo $uid; //POST cannot get the value either.
what should I do then?
Already solved it myself