Bonjour,
Je bloc sur le problème suivant. j'ai beau regardé sur le web, je trouve pas de solution encore.
j'ai les messages suivant lorsque je test mon login et password
Warning: session_register(): Cannot send session cookie - headers already sent by (output started at /var/www/data/woo/C/C/8/A/CC8AA43K/lhm/checkpoint.php:9) in /var/www/data/woo/C/C/8/A/CC8AA43K/lhm/checkpoint.php on line 45
Warning: session_register(): Cannot send session cache limiter - headers already sent (output started at /var/www/data/woo/C/C/8/A/CC8AA43K/lhm/checkpoint.php:9) in /var/www/data/woo/C/C/8/A/CC8AA43K/lhm/checkpoint.php on line 45
Warning: Cannot modify header information - headers already sent by (output started at /var/www/data/woo/C/C/8/A/CC8AA43K/lhm/checkpoint.php:9) in /var/www/data/woo/C/C/8/A/CC8AA43K/lhm/checkpoint.php on line 47
Voici le code de la page checkpoint
<?php
$host="localhost"; // Host name
$username="root"; // Mysql username
$password="non"; // Mysql password
$db_name="CC8AA43K1"; // Database name
$tbl_name="connection"; // Table name
// Connect to server and select databse.
mysql_select_db("$db_name")or die("cannot select DB");
// username and password sent from form1
$myusername = $_POST['myusername'];
$mypassword = $_POST['mypassword'];
// To protect MySQL injection (more detail about MySQL injection)
$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($mypassword);
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
$result=mysql_query($sql);
// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if($count == 1)
{
// Register $myusername, $mypassword and redirect to file "login_success.php"
session_register("myusername");
session_register("mypassword");
header("location:administration.php");
}
else
{
echo "Wrong Username or Password";
}
?>
le probleme vient de ces lignes :
session_register("myusername");
session_register("mypassword");
header("location:administration.php");
mais je ne vois pas comment les modifier si c'est le cas.
si joint la page de login : http://www.premiumwanadoo.com/ao1teamdod/lhm/login.php j'ai mis bilo / watcher en log/pas par default.
D'avance merci pour votre aide.
