Вот код:
if(isset($_POST['account_get1']) || empty($_POST['account_get'])){
$check_user = mysqli_query($connect, "SELECT * FROM `users` WHERE `login` = '$login'");
if(mysqli_num_rows($check_user) > 0){
$user = mysqli_fetch_assoc($check_user);
$_SESSION['user'] = [
"id" => $user['id'],
"login" => $user['login'],
"email" => $user['email'],
"lang" => $user['lang'],
"device" => $user['device'],
"profile_image" => $user['profile_image'],
"now_play" => $user['now_play']
];
$login = $_SESSION['user']['login'];
$device = $_SESSION['user']['device'];
$device = $_SERVER['REMOTE_ADDR'];
mysqli_query($connect, "UPDATE `users` SET `devide` = '$device' WHERE `login` = '$login'");
}
}else{
// nope...
}
<form action="" method="post">
<div id="row11" onclick="login1()">
<img src="<?= $avatar ?>" alt="" width="100px" height="100px" id="profile_image" name="account_get1">
<p id="profile_name"> <?= $login ?> </p>
</div>
</form>
При нажатии он должен выполнять функцию, но почему-то этого не происходит.