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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
| <?php
/*recuperer les informations concernant le client*/
$login = $_POST['pseudo'];
$mot_de_passe = $_POST['password'];
/*connexion au serveur mysql */
$l= mysql_connect("localhost","root","") or die("Echec de connexion au serveur".mysql_error());
/*print("connexion au serveur reussie")."<br />";*/
/* connexion a la base de donnees*/
$b= mysql_select_db("projetbd") or die("Echec de connexion à la base".mysql_error());
/*print("connexion à la base reussie")."<br />";*/
/* recherche du client */
$sql= "SELECT password from info_personne WHERE pseudo = '$login' ";
$res= mysql_query($sql);
$reslt = mysql_fetch_array($res);
if ( ($reslt == 0 ) ) { die("erreur de mot de passe ou de login");}
else {
$mop_stocke = $reslt['password'];
}
/*operation de soustraction*/
$a = $mot_de_passe - $mop_stocke;
if( ($a) == !0 )
{
die("erreur de mot de passe ou de login");
}
else if( ($a ) == 0 ) {
/*echo ("le resulat de la premiere base est $res_1")."<br />";*/
mysql_close($l);
header(sprintf("Location: http://127.0.0.1/app_V2/page1.html ", $insertGoTo));
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//fr"><html>
<html>
<head>
<title> Connexion : pilotage d'un projet Foad</title>
<link href="styles.css" rel="stylesheet" type="text/css">
</head>
<BODY >
<br> <br> <br>
<table width="539" height="280" border="1" align="center" BGCOLOR=" #F0F8FF" >
<tr>
<th width="639" align="Center" >
<div id="moi" align="center">
<h2><MARQUEE behavior="scroll" align="center" direction="left" height="120" scrollamount="2" scrolldelay="1" onmouseover='this.stop()' onmouseout='this.start()'>
Mise en oeuvre d'un projet Foad</MARQUEE></h2>
</div>
</th>
</tr>
<tr >
<td align ="center" >
<h3>* Pilotage d'un projet Foad * </h3>
<form name="page_form" onsubmit="return verif_formulaire1(this);" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" id= "hsides" >
<fieldset class=radio align = "center">
<br>
<table bgcolor="#F0F8FF" width="515" height="80" align="center" border="0" >
<tr>
<td colspan="8" valign="center"><b><em><u>Déja inscrit</u> :</em> </b>
</td>
<td colspan="4" height="30" align="left" class="txt_blanc1"> Login :
<input type="text" name="pseudo" size="15" value="" style="font-size:10px; background-color:#EOFFFF; color:#EOFFFF;">
</td>
</tr>
<tr>
<td colspan="8"></td>
<td colspan="2" align="left" height="30" nowrap class="txt_blanc1"> Mot de passe :
<input type="password" name="password" size="10" value="" style="font-size:10px; background-color:#EOFFFF; color:#EOFFFF;">
</td>
</tr>
<tr>
<td colspan="4" width="55"></td>
<td colspan="8" align="left" width="2" style="font-size:15px">
<br>
<a href="enregistrement1.html" > Nouvel utilisateur ? cliquez içi >> </a>
</td>
</tr>
</table>
<br><br>
<!--*****************************-->
</fieldset>
<br>
<center>
<input name="submit" value="Connexion >>" type="submit">
</center>
</form>
</body>
</html> |