prepare("UPDATE users SET pass_hash=? WHERE id=?") ->execute([password_hash($n1, PASSWORD_DEFAULT), $me['id']]); $ok = 'Password changed.'; } } page_start('Change password', ['back' => '/profile.php']); if ($err) p_err($err); if ($ok) p_ok($ok); p_form('/password.php', [ ['name' => 'old', 'label' => 'Current password', 'type' => 'password'], ['name' => 'new1', 'label' => 'New password', 'type' => 'password'], ['name' => 'new2', 'label' => 'Repeat new', 'type' => 'password'], ], 'Change'); p_links([['/profile.php', 'Back to profile']]); page_end();