if ( empty($_POST['mail']) or empty($_POST['societe']) ) { $contenu = $con->assocQuery("SELECT * FROM membres,societe WHERE mbr_pseudo='$nick' and mbr_societe_id = societe_id") or print $con->error; $societes = $con->assocQuery("SELECT societe_nom FROM societe"); $contenu = $contenu[0]; echo "
"; } else { $mail = $_POST['mail']; $societe = $_POST['societe']; $contenu = $con->assocQuery("SELECT societe_id FROM societe WHERE societe_nom='$societe'") or print $con->error; $contenu = $contenu[0]; if (empty($contenu)) { echo "Error : societe inexistante !"; } else { $societe_id = $contenu[societe_id]; $query = "UPDATE membres SET mbr_mail='$mail',mbr_societe_id='$societe_id'"; $con->execute($query) or print $con->error; echo "