Erreur
sirin angel
Messages postés
15
Date d'inscription
Statut
Membre
Dernière intervention
-
Utilisateur anonyme -
Utilisateur anonyme -
Bonjour,
j'ai un erreur(( ! ) Parse error: syntax error, unexpected 'header' (T_STRING) in C:\wamp\www\imen\logs.php on line 26 ) je trouve pas et merci d'avance
<?php
//demarrage de session
session_start();
//inclusion de la page de connexion mysql
include 'connect.php';
//test et traitement des identifiant saisi par l'utilisateur
if(!empty($_POST['identifiant']) && !empty($_POST['motdepass'])){
$identifiant = $_POST['identifiant'];
//supression de caractères indésirables type : ' " < >
$identifiant = mysql_real_escape_string($identifiant);
$identifiant = htmlentities($identifiant);
$motdepass = $_POST['motdepass'];
$motdepass = mysql_real_escape_string($motdepass);
$motdepass = htmlentities($motdepass);
//cryptage sha1 du mot de pass
//$motdepass = sha1($motdepass);
$req = "SELECT login, pw, role FROM user WHERE login = '".$identifiant."'"." AND pw ='".$motdepass."'";
$result = mysql_query($req);
$tableaux = mysql_fetch_row($result);
//test de résultat utilisateur/Mysql
if ($identifiant == $tableaux[0] && $motdepass == $tableaux[1] && $type==0){
$_SESSION['connection']=1;
$_SESSION['utilisateur']=$tableaux[0];
$type=0
header('Location: content.php');
}
else if ($identifiant == $tableaux[0] && $motdepass == $tableaux[1] && $type==1) {
$_SESSION['connection']=1;
$_SESSION['utilisateur']=$tableaux[0];
$type=1;
header('Location: employe.php');
}
else {
$_SESSION['badlogin'] = 1;
sleep(2);
header('Location: index.php');
}
}
else{
echo "Identifiant ou mot de pass incorrect....";
$_SESSION['connection']=0;
header('Location: index.php');
}
?>
j'ai un erreur(( ! ) Parse error: syntax error, unexpected 'header' (T_STRING) in C:\wamp\www\imen\logs.php on line 26 ) je trouve pas et merci d'avance
<?php
//demarrage de session
session_start();
//inclusion de la page de connexion mysql
include 'connect.php';
//test et traitement des identifiant saisi par l'utilisateur
if(!empty($_POST['identifiant']) && !empty($_POST['motdepass'])){
$identifiant = $_POST['identifiant'];
//supression de caractères indésirables type : ' " < >
$identifiant = mysql_real_escape_string($identifiant);
$identifiant = htmlentities($identifiant);
$motdepass = $_POST['motdepass'];
$motdepass = mysql_real_escape_string($motdepass);
$motdepass = htmlentities($motdepass);
//cryptage sha1 du mot de pass
//$motdepass = sha1($motdepass);
$req = "SELECT login, pw, role FROM user WHERE login = '".$identifiant."'"." AND pw ='".$motdepass."'";
$result = mysql_query($req);
$tableaux = mysql_fetch_row($result);
//test de résultat utilisateur/Mysql
if ($identifiant == $tableaux[0] && $motdepass == $tableaux[1] && $type==0){
$_SESSION['connection']=1;
$_SESSION['utilisateur']=$tableaux[0];
$type=0
header('Location: content.php');
}
else if ($identifiant == $tableaux[0] && $motdepass == $tableaux[1] && $type==1) {
$_SESSION['connection']=1;
$_SESSION['utilisateur']=$tableaux[0];
$type=1;
header('Location: employe.php');
}
else {
$_SESSION['badlogin'] = 1;
sleep(2);
header('Location: index.php');
}
}
else{
echo "Identifiant ou mot de pass incorrect....";
$_SESSION['connection']=0;
header('Location: index.php');
}
?>
A voir également:
- Erreur
- Erreur 0x80070643 - Accueil - Windows
- Erreur 0x80070643 Windows 10 : comment résoudre le problème de la mise à jour KB5001716 - Accueil - Windows
- J'aime par erreur facebook notification - Forum Facebook
- Code erreur f3500-31 ✓ - Forum Bbox Bouygues
- Java code erreur 1603 ✓ - Forum Windows