Ereurs

salwa -  
-Shadow- Messages postés 2152 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,
<?php
session_start();
$erreur=false;
if(isset($_POST['identifiant_adm'])&&isset($_POST['mot_passe']))
{
$l=$_POST['identifiant_adm'];
$_SESSION["identifiant_adm"]=$l;
$pwd=$_POST['mot_passe'];
$_SESSION["mot_passe"]=$pwd;
$connexion=mysql_connect('localhost','root','') or die("erreur de connexion au serveur");
mysql_select_db('site1',$connexion) or die("erreur de connexion à la base");
$sql="select * from administrateur where identifiant_adm='$l' and mot_passe='$pwd';";
$res=mysql_query($sql) or die(mysql_error());
if($ligne=mysql_fetch_array($res))
{
header('location:bienvenue.php');
}
else
{
$erreur=true;
}
mysql_close();
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Document sans nom</title>
<style type="text/css">
<!--
.Style54 {color: #666600}
.Style78 {color: #CC0066;
font-family: Arial, Helvetica, sans-serif;
}
body {
background-color: #FFDDE9;
}
.Style88 {font-size: 12px; }
.Style94 {color: #CC0066; }
.Style96 {color: #993333}
.Style99 {color: #0000FF}
.Style101 {color: #0000FF; font-size: 10px; }
.Style106 {color: #804000; font-family: Arial, Helvetica, sans-serif; font-size: 10px; }
.Style107 {color: #804000; }
.Style110 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
<script language="JavaScript">
<!--
function verif()
{
if(document.fconnexion.identifiant_adm.value == "")
{
alert("Login obligatoire");
document.fconnexion.identifiant_adm.focus();
return false;
}
if(document.fconnexion.mot_passe.value == "")
{
alert("Mot de passe obligatoire");
document.fconnexion.mot_passe.focus();
return false;
}
if (fconnexion.mot_passe.value.length < 4)
{
alert('Veuillez entrer votre mot de passe.SVP (4 caractéres minimum)');
fconnexion.mot_passe.focus();
return(false);
}

return true;
}
-->
</script>
<link href="fstile.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Style87 {color: #FFCC99; font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
.Style111 {
color: #666666;
font-size: 10px;
}
.Style112 {font-size: 12px; font-family: Arial, Helvetica, sans-serif;}
.Style114 {color: #666666}
.Style105 {color: #993366}
.Style115 {font-weight: bold}
-->
</style>
</head>
<body onLoad="document.fconnexion.identifiant_adm.focus();">
<table width="600" height="498" border="1" align="center" bordercolor="#FE98BE">
<tr>
<td width="590" height="492" bgcolor="#FFFFFF"><p align="center" class="Style78">
<img src="100MEDIA/4.gif" width="590" height="158">
<table width="590" height="21" border="0" align="center" background="footer_fond.gif">
<tr>
<td colspan="2" background="100MEDIA/footer_fond.gif"><script src="xaramenu.js">
</script>
<script src="camden3.js"></script>
</table>
<table width="590" height="243" border="0.5" align="center" bordercolor="#FFCCCC">
<tr>
<td width="96"><img src="100MEDIA/sud-beaute-bis_09.gif" width="96" height="286"></td>
<td width="498" height="239" bgcolor="#FFFFFF"><form name="fconnexion" method="post" action="administration.php" onSubmit="return verif()">
<table width="311" height="248" border="1" align="center" bordercolor="#666666">
<tr>
<td width="305" height="242" bgcolor="#F4D0E3"><fieldset class="Style96" style="padding: 2; width:339; height:105">
<div align="center">
<p class="Style114"><strong><img src="100MEDIA/pssword.gif" width="224" height="79"></strong></p>
</div>
<div align="center" class="Style99">
<p align="center" class="Style114"><font face="arial,helvetica">Login                
<input name='identifiant_adm' type='text' id="identifiant_adm" size="20" tabindex="0">
</font></p>
<p align="center"><span class="Style114"><font face="arial,helvetica">Mot de passe </font></span><span class="Style107"><font face="arial,helvetica"></font><font face="arial,helvetica"> </font></span><font face="arial,helvetica"></font><font face="arial,helvetica"> 
<input name='mot_passe' type="password" id="mot_passe" size="20" maxlength="8"/>
</font></p>
</div>
<p align="center" class="Style99" dir="ltr"> <font face="arial,helvetica">
<input type="submit" name="valider" value="Valider" onMouseUp="verif();">
</font></p>
</fieldset>
<div align="right" class="Style94">
<p align="center" class="Style115"><span class="Style101"> <span class="Style107"> </span></span><span class="Style106"> <span class="Style88">  </span></span><span class="Style112"><a href="changer.php" class="Style111">Changer mot de passe</a></span><span class="Style106 Style88">      </span><span class="Style88"><a href="changer1.php" class="Style111"><span class="Style110">Changer login </span></a></span></p>
</div></td>
</tr>
</table>
</form>
</td>
</tr>
</table>

<table width="590" height="55" border="0" align="center">
<tr>
<td width="734" height="51" background="100MEDIA/footer_fond.gif"><div align="center" class="Style107"> <span class="Style87">
<marquee>
<span class="Style114">Adresse : Route Houmt Souk Midoun Km 1 Djerba 4180<strong> T él / Fax :</strong> +216 75 62 05 50 <strong>Mobile :</strong> +216 99 23 32 20 E-mail</span><span class="Style105">:<a
href="mailto:lamia.zaraa-ssp@topnet.tn" class="Style105">lamia.zaraa-ssp@topnet.tn</a></span>
</marquee>
</span></div></td>
</tr>
</table>
</table>
<?php
if($erreur) echo "<script language='JavaScript'>alert('Login et mot de passe érronés');</script>";
?>
</body>
</html>

1 réponse

-Shadow- Messages postés 2152 Date d'inscription   Statut Membre Dernière intervention   270
 
Oui qu'est-ce qu'on peut faire pour toi?
0