salut je veux realiser un espace admin pour cela je me suis servis des sessions
login et password sont situé dans ma bdd
j'ai fais ce code mais il me sorte quelque debogage
admin.html
accee_admin.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57<?php session_start() ?> <SCRIPT LANGUAGE="javascript" TYPE="text/javascript" SRC="admin_control.js"></SCRIPT> <div id="emailing"> <table width="601" height="435" border="0" align="center"> <tr> <td height="103" colspan="2"><div align="center"><img src="images/consol-intervallemedia.jpg" width="578" height="144" /></div></td> </tr> <tr> <td colspan="2"height="260"><div id="admin"> <table width="595" border="0"> <tr> <td background="images/console_admin.png" width="585" height="325" > <form name="form1" method="post" action=""> <table width="448" height="196" border="0" align="center"> <tr> <td width="174" height="74"> </td> <td colspan="2"><label></label></td> </tr> <tr> <td height="43"> </td> <td colspan="2"><label> <input name="login" type="text" id="login" /> </label></td> </tr> <tr> <td> </td> <td colspan="2"><input name="password" type="password" id="password" /></td> </tr> <tr> <td> </td> <td width="75"><label><br> <input type="button" name="Submit" value="Envoyer" onclick="ajax3()" class="button"/> </label></td> <td width="185"><label><br> <input type="reset" name="Submit2" value="Effacer" class="button"> </label></td> </tr> </table> </form></td> </tr> </table> </div> <br /> <br /> <label></label> <label></label> <label></label></td> </tr> <tr> <td width="20"> </td> <td width="486"><label> </label> <label> </label></td> </tr> </table> </div>
quand l'admin tape le password incorrecte le message s'affiche tranquillement sinon j'ai eu debogage
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <?php $login=$_POST['login']; $password=$_POST['password']; if(!empty($login) && !empty($password)) { include 'connexion.php'; $sql="SELECT password FROM `identification` where pseudo='$login'"; $req=mysql_query($sql) or die("erreur en sql! <br>".$sql.'<br>'. mysql_error()); $data=mysql_fetch_assoc($req); ?> <?php $pass=md5($password); if($data['password'] != $pass) { print('mauvais login password') ; } else if($data['password'] = $password) { session_start(); $_SESSION['login'] = $login; print('Vous etes bien logué'); include('emailing.php'); exit; } } ?>
etWarning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\documents and settings\administrateur\bureau\intervallemedia 2009\intervallemedia 2009\intervallemedia 2009\html\accee_admin.php:16) in c:\documents and settings\administrateur\bureau\intervallemedia 2009\intervallemedia 2009\intervallemedia 2009\html\accee_admin.php on line 30
je suis debutant et je connais pas beaucoup sur les sessions malgré que j'ai cherché sur google et developpez mais j'ai pas compris 100%Notice: A session had already been started - ignoring session_start() in c:\documents and settings\administrateur\bureau\intervallemedia 2009\intervallemedia 2009\intervallemedia 2009\html\emailing.php on line 2ainsi pourquoi j'ai eu ce debogage
![]()
Partager