probleme de redirection
- Accueil
- Forum
- Programmation
- PHP
- probleme de redirection

jeannot_gates Le 10 juin 2016 à 13:34 (Édité le 25 janvier 2019 à 17:51)
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\thelifestore\connexion.php:114)
in C:\xampp\htdocs\thelifestore\connexion.php on line 139
quelqu'un pourrait il me dire ce qui cloche car j'ai toute essayer

tiarnan Le 12 juin 2016 à 18:27 (Édité le 1 janvier 1970 à 01:00)

Balatharas Le 13 juin 2016 à 18:29 (Édité le 1 janvier 1970 à 01:00)

jeannot_gates Le 17 juin 2016 à 19:40 (Édité le 1 janvier 1970 à 01:00)
<?php if(isset($_POST['submit'])) { $prenom=htmlspecialchars(trim($_POST['prenom'])); $pseudo=htmlspecialchars(trim($_POST['pseudo'])); $mail=htmlspecialchars(trim($_POST['mail'])); $description=htmlspecialchars(trim($_POST['description'])); $passe=sha1($_POST['passe']); $passe2=sha1($_POST['passe2']); $condition=''; $longueur_pseudo=strlen($pseudo); $longueur_prenom=strlen($prenom); $longueur_description=strlen($description); if(!empty($_POST['prenom']) and !empty($_POST['pseudo']) and !empty($_POST['mail']) and !empty($_POST['passe']) and !empty($_POST['passe2']) and !empty($_POST['condition']) and !empty($_POST['description'])) { if($longueur_prenom >=4) { if($longueur_pseudo >= 6) { $verif_pseudo=$bdd->prepare("SELECT * FROM inscrit WHERE pseudo=?"); $verif_pseudo->execute(array($pseudo)); $pseudo_existe=$verif_pseudo->rowCount(); if($pseudo_existe == 0) { if($passe == $passe2) { $verif_passe=$bdd->prepare("SELECT * FROM inscrit WHERE passe=?"); $verif_passe->execute(array($passe)); $passe_existe=$verif_passe->rowCount(); if($passe_existe == 0) { if(filter_var($mail,FILTER_VALIDATE_EMAIL)) { $verif_mail=$bdd->prepare("SELECT * FROM inscrit WHERE mail=?"); $verif_mail->execute(array($mail)); $mail_existe=$verif_mail->rowCount(); if($mail_existe == 0) { if($longueur_description >=30) { $inscription=$bdd->prepare("INSERT INTO inscrit(prenom,pseudo,passe,mail,description) VALUES(?,?,?,?,?)"); $inscription->execute(array($prenom,$pseudo,$passe,$mail,$description)); header('Location:connexion.php'); } else { $erreur='Votre description doit dépasser les 30 caractères<br>'; } } else { $erreur='Cette adresse mail est déjà utiliser<br>'; } } else { $erreur="Cette adresse mail n'est pas valide<br>"; } } else { $erreur='Ce mot de passe est déjà utiliser<br>'; } } else { $erreur='Vos mot de passe ne sont pas identiques<br>'; } } else { $erreur='Votre pseudo est déjà utiliser<br>'; } } else { $erreur='Votre pseudo est trop court il doit avoir au moins 6 caractéres<br>'; } } else { $erreur='Votre prenom est trop court il doit avoir au moins 4 caractéres<br>'; } } else { $erreur='Veuillez remplir tous les champs<br>'; } } ?>

scorpion Le 20 juin 2016 à 17:10 (Édité le 1 janvier 1970 à 01:00)

Dwardower Le 20 juin 2016 à 18:44 (Édité le 1 janvier 1970 à 01:00)
header('location: lesite.fr');

jeannot_gates Le 29 juin 2016 à 19:18 (Édité le 1 janvier 1970 à 01:00)