prepare("UPDATE users SET username=:username, email=:email WHERE id={$_SESSION['user_id']}"); $query->bindParam(':username', $_POST['username']); $query->bindParam(':email', $_POST['email']); if($query->execute()) { echo "
Password updated
"; } else { echo "Password update failed
"; } } } header("Refresh: 2; URL=$_SERVER[HTTP_REFERER]"); require_once(TEMPLATES_PATH . "/footer.php"); ?>