Bonjour a tous,
je fais un système d'ouverture de session si l'utilisateir est enregistré. Avec EasyPHP, ca marchait puis tout d'un coup ca marche plus. J'y comprends plus rien; De l'aide svp
mon erreur :
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at e:\sites_web\pricil\log_retour.php:9) in e:\sites_web\pricil\log_retour.php on line 18
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at e:\sites_web\pricil\log_retour.php:9) in e:\sites_web\pricil\log_retour.php on line 18
Notice: Use of undefined constant session - assumed 'session' in e:\sites_web\pricil\log_retour.php on line 23
Fatal error: Call to undefined function: start() in e:\sites_web\pricil\log_retour.php on line 23
et mon code (en début de page) :
<?php
include "Dossier/connect.php";
$user=
addslashes(
htmlspecialchars($_POST['user']));
$passw=
addslashes(
htmlspecialchars($_POST['passw']));
// verif mot de passe dans table utilisateur
$sql = "SELECT COUNT(*) AS membre FROM utilisateurs WHERE user='".$user."' AND passw='".$passw."'";
echo $sql;
$retour =
mysql_query($sql);
$donnees =
mysql_fetch_array ($retour);
$count = $donnees['membre'];
echo '<br>count='.$count;
//echo 'count='.$count;//
if ($count == 1)
{
session_start(); // on ouvre la session
$_SESSION ['user'] = $user;
$_SESSION['passw'] = $passw;
//header ('Location : membre.php');
$var = 'Bienvenu '.$user;
session-start();
}
else
{
$var = 'Vous n\'avez pas été identifié'; // le login n'a pas été reconnu
}
echo '<br>'.$var;
mysql_close();
?>