Bonjour
Je veux creer un espace membre qui permet de verifier les entréé des utilisateur,ret s'ils sont les mm aves les info dans la base de donnée j'ai fait le suivant:
j'ai deja ajouter un membre pour verifier si ca se passe mais il me donne des erreurs bizarreCode:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 <?php try { // On se connecte à MySQL $bdd = new PDO('mysql:host=localhost;dbname=personnel','root',''); } catch(Exception $e) { // En cas d'erreur, on affiche un message et on arrête tout die('Erreur : '.$e->getMessage()); } ?> <?php $req = $bdd->query('SELECT Nom,user_name,user_pwd FROM users'); while($donnees=$req->fetch()) { ?> <?php if ((isset($_POST['user_name']) AND $_POST['user_name'] == $donnees['user_name']) AND (isset($_POST['user_pwd']) AND $_POST['user_pwd'] == $donnees['user_pwd'])) { session_start(); $_SESSION['Nom']=$donnees['Nom']; header ('Location:../controle/bienvenu.php'); echo 'bienvenu'; } else{ header ('Location:../vue/index.php'); } ?> <?php } ?>
bienvenuCitation:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\wamp\www\module\authentification_pers.php:14) in C:\wamp\www\module\authentification_pers.php on line 20
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\wamp\www\module\authentification_pers.php:14) in C:\wamp\www\module\authentification_pers.php on line 20
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\module\authentification_pers.php:14) in C:\wamp\www\module\authentification_pers.php on line 22
Merci