Authentification

cs_fizou1989 Messages postés 17 Date d'inscription samedi 7 novembre 2009 Statut Membre Dernière intervention 9 janvier 2011 - 28 déc. 2010 à 22:42
TychoBrahe Messages postés 1309 Date d'inscription samedi 31 janvier 2009 Statut Membre Dernière intervention 5 juin 2013 - 30 déc. 2010 à 14:51
bsr,
j'espere qu'il ya quelqu'un qui peut m 'aider
<?php //authentification
if (isset($_POST['Id_i']) AND isset($_POST['password_i']))
{

$Id_i = $_POST['Id_i'];
$password_i = $_POST['password_i'];

if($Id_i&&$password_i)
{

$conn = oci_connect('eminfo','eminfo','localhost/XE');
$query = oci_parse ($conn," SELECT * FROM entreprise WHERE ID_ENTREPRISE='$Id_i'");
$numrows = oci_num_rows($query);
if($numrows==1)
{

$query = oci_parse ($conn ," SELECT * FROM entreprise WHERE ID_ENTREPRISE='$Id_i' AND MOT_DE_PASSE='$password_i' ");
$numrows = oci_num_rows($query);
if ($numrows==1)
{//utilisateur identifié
$_SESSION['ID_ENTREPRISE']='Id_i';

$extract = oci_fetch_assoc($query);


//extraction des information sur lutilisateur identifié
$query = oci_parse($conn,"SELECT * FROM entreprise WHERE ID_ENTREPRISE='$Id_i' ");
$extract = oci_fetch_assoc($query);
$_SESSION['nom_entreprise'] = $extract['nom_entreprise'];



header("Refresh: 0;url='accentre.php'");
}
else
die(" Incorrect password ! ");

}
else
die (" The username doesn't exist ") ;
}
else
{
die (" please enter a username and a password ! ");
}
}
?>


je trouve po ou l 'erreur

1 réponse

TychoBrahe Messages postés 1309 Date d'inscription samedi 31 janvier 2009 Statut Membre Dernière intervention 5 juin 2013 12
30 déc. 2010 à 14:51
Salut,

j'espere qu'il ya quelqu'un qui peut m 'aider

Oui, une vielle voyante avec sa boule de cristal. C'est en effet la seule qui peux deviner ton erreur que tu n'explique pas.

Autre chose, en regardant ton code vite fait je peux te garantir que c'est une vrai passoire niveau sécurité (injections de SQL & co).
0
Rejoignez-nous