Salut,

Je veux creer une page d'authentification en utilisant dreamweaver,alors j'ai bien suivi toutes les etapes,et lorsque j'ai lance le navigateur voici l'erreur que m'a donne:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\EasyPHP-5.3.2i\www\abonnement\main.php:1) in C:\EasyPHP-5.3.2i\www\abonnement\main.php on line 0

et voila le code de la page main.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
58
59
60
 
<?php virtual('/abonnement/Connections/jaja.php'); ?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
  session_start();
}
 
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
  $_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
 
if (isset($_POST['login'])) {
  $loginUsername=$_POST['login'];
  $password=$_POST['pass1'];
  $MM_fldUserAuthorization = "id_client";
  $MM_redirectLoginSuccess = "/site-impression/accueil.php";
  $MM_redirectLoginFailed = "/site-impression/main.php";
  $MM_redirecttoReferrer = true;
  mysql_select_db($database_jaja, $jaja);
 
  $LoginRS__query=sprintf("SELECT login, pass1, id_client FROM client WHERE login='%s' AND pass1='%s'",
  get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password)); 
 
  $LoginRS = mysql_query($LoginRS__query, $jaja) or die(mysql_error());
  $loginFoundUser = mysql_num_rows($LoginRS);
  if ($loginFoundUser) {
 
    $loginStrGroup  = mysql_result($LoginRS,0,'id_client');
 
    //declare two session variables and assign them
    $_SESSION['MM_Username'] = $loginUsername;
    $_SESSION['MM_UserGroup'] = $loginStrGroup;	      
 
    if (isset($_SESSION['PrevUrl']) && true) {
      $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];	
    }
    header("Location: " . $MM_redirectLoginSuccess );
  }
  else {
    header("Location: ". $MM_redirectLoginFailed );
  }
}
?>
 
<html>
<head></head>
<body>
<td height="89" nowrap="nowrap"><form id="form1" name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
              <label>
              Login:
              <input name="login" type="text" id="login" size="15"/>
</label><br />
              <label>Mot de passe:</label>
			      <input name="pass1" type="password" id="pass" size="15" />
			      <br />
			      <br />
 
    <input name="envoyer" type="submit" value="se connecter" /></form>
Alors ou est le probleme?

Et merci d'avance.