1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
<form name="ident" action="javascript:identif()" method="POST">
<table>
<tr>
<td >Login :</td>
<td><input onBlur="if(this.value=='') this.value='Login...';"onFocus="if (this.value=='Login...') this.value='';" size=15 name="pseudo_membre" type="text" id="pseudo_membre">
</td>
</tr>
<tr>
<td >Mot de passe :</td>
<td ><input name="passe_membre" type="password" id="passe_membre" size="15"> </td>
</tr>
</table>
<?
if (isset($_POST['pseudo_membre']) AND isset($_POST['passe_membre'])){
$pseudo=$_POST['pseudo_membre'];
$pass=$_POST['passe_membre'];
mysql_select_db($database_a, $a);
$query_Recordset1 = "SELECT * FROM membre WHERE LOGIN='$pseudo' and PASSWORD='$pass'";
$Recordset1 = mysql_query($query_Recordset1, $a) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
echo $query_Recordset1;
}
echo '<script language="Javascript">
<!--
function identif(){';
if ($totalRows_Recordset1==1){
echo 'document.location.replace("user.php?lng=fr");';
}else { echo 'document.location.replace("news.php?lng=fr");'; }
echo '}
// -->
</script>';
?>
<div align="center"><input class="bouton" type="submit" value="identif" "></div>
</form> |
Partager