Erreur

sirin angel Messages postés 18 Statut Membre -  
 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');
}
?>
A voir également:
  • Erreur
  • Erreur t32 - <a href="https://forums.commentcamarche.net/forum/livebox-200">Forum Livebox</a>
  • Erreur s3 bbox - <a href="https://forums.commentcamarche.net/forum/bbox-bouygues-285">Forum Bbox Bouygues</a>
  • Iptv erreur de lecture - <a href="https://forums.commentcamarche.net/forum/tv-video-21">Forum TV & Vidéo</a>
  • Erreur 4101 - <a href="https://forums.commentcamarche.net/forum/carte-graphique-181">Forum Carte graphique</a>
  • Erreur France TV : impossible de lire les vidéos en replay - <a href="https://forums.commentcamarche.net/forum/lecteurs-et-supports-video-245">Forum Lecteurs et supports vidéo</a>

1 réponse

Utilisateur anonyme
 
Bonjour

$type=0 
header('Location: content.php'); 


il manque un ; après le 0 (avant le header)
0