.01
.02
.03
.04
.05
.06
.07
.08
.09
.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
|
|
<?php
/******************************************************************************/
/* */
/* __ ____ */
/* ___ / / ___ / __/__ __ _____________ ___ */
/* / _ \/ _ \/ _ \_\ \/ _ \/ // / __/ __/ -_|_-< */
/* / .__/_//_/ .__/___/\___/\_,_/_/ \__/\__/___/ */
/* /_/ /_/ */
/* */
/* */
/******************************************************************************/
/* */
/* Titre : Ouvrir une page protégée par accés sécurisé */
/* */
/* URL : http://www.phpsources.org/scripts170-PHP.htm */
/* Auteur : thekid */
/* Date édition : 19 Mai 2006 */
/* */
/******************************************************************************/
?>
CREATE TABLE membres (
id int(11) NOT NULL auto_increment,
pass varchar(55) NOT NULL default '',
user varchar(55) NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM;
*************************************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
// variable pour se connecter a la base de donner.
$hostname = "";//Host Name ..
$database = ""; //Data Base
$username = ""; //Username
$password = ""; //Password
// connection à MySQL
mysql_connect($hostname, $username, $password) or die(mysql_error());
mysql_select_db($database) or die ( 'Sélection de la base impossible' );
$retour = mysql_query('SELECT * FROM username ORDER BY id DESC');
while ($donnees = mysql_fetch_array($retour))
{
if(isset($_POST) && !empty($_POST['login']) && !empty($_POST['password']))
{
if($_POST['login'] == $donnees['user'] && $_POST['password'] == $donnees['pass'])
{
?>
<BR> Bienvenue :: <?php echo $_POST['login'] ; ?> ::<BR>
Voici vos option : <BR>
... a vous de decider la page prochaine ...<BR>
<?php
}
else
{
echo'Vous n\'etes pas autorise a voir sette page';
}
}
else
{
echo'Vous devez remplir les champs';
}
}
?>
<form action="connectcreerced.php" method="post" name="connection" id="connection">
<table width="261" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="117" height="19" valign="top"><strong>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif">Login
: </font></strong></td>
<td width="144" valign="top"> <input name="login" type="text" id="login"></td>
</tr>
<tr>
<td height="19" valign="top"><strong>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif">Password
:</font></strong></td>
<td valign="top"><input name="password" type="password" id="password"> </td>
</tr>
<tr>
<td height="19" colspan="2" valign="top"><div align="center">
<input type="submit" name="Submit" value="Envoyer">
</div></td>
</tr>
</table>
</form>
</body>
</html>
|