$update = $bdd->prepare("UPDATE `users` SET `email`= ? WHERE `username` = ?"); $update->execute(array($_POST['email'], $_SESSION['username'])); echo "Votre email a bien été modifié !"; } catch (Exception $e) { die("Some error occured while the updating process : " . $e); } } else { echo 'Rentrez un email valide.'; } } else { if (isset($_POST['upload'])) { $picture = User::checkFile(); if (!is_array($picture)) { echo $picture; } else { echo User::moveFile($picture); } } } } try { $response = $bdd->prepare("SELECT * FROM `users` LEFT JOIN `files` ON `users`.image_id = `files`.id WHERE `username` = ?"); $response->execute(array($_SESSION['username'])); $datas = $response->fetch(); } catch (Exception $e) { die("Some error occured while looking for your profile : " . $e); } ?> <a href="first.php">Retour</a>