setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $conn->prepare("SELECT ID FROM users WHERE username = :username"); $stmt->bindParam(':username', $_SESSION['username']); $stmt->execute(); $result = $stmt->fetch(PDO::FETCH_ASSOC); $idsession = $result['ID']; } catch (PDOException $e) { echo "Error: " . $e->getMessage(); } $conn = null; } include("class/sqlconnect.php"); ?>
Revenir à l'accueil