Scipt session qui déconne
loulou
-
lezao Messages postés 469 Date d'inscription Statut Membre Dernière intervention -
lezao Messages postés 469 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
voici mon script
Dès que j'ouvre la page, j'ai toujours les deux lignes d'erreurs suivantes
Notice: Undefined index: uid in C:\Program Files\EasyPHP5.2.10\www\accesscontrol\accesscontrol.php on line 6
Notice: Undefined index: pwd in C:\Program Files\EasyPHP5.2.10\www\accesscontrol\accesscontrol.php on line 7
Donc en gros il ne reconnait pas uid et pwd mais c'est normal non puisque les champs n'ont pas encore été remplis la première fois.
voici mon script
<?php // accesscontrol.php session_start(); $uid = isset($_POST['uid']) ? $_POST['uid'] : $_SESSION['uid']; $pwd = isset($_POST['pwd']) ? $_POST['pwd'] : $_SESSION['pwd']; if(!isset($uid)) { ?> <!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> Please Log In for Access </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <h1> Login Required </h1> <p>You must log in to access this area of the site. If you are not a registered user, <a href="signup.php">click here</a> to sign up for instant access!</p> <p><form method="post" action="<?php $_SERVER['PHP_SELF'] ?>"> User ID: <input type="text" name="uid" size="8" /><br /> Password: <input type="password" name="pwd" SIZE="8" /><br /> <input type="submit" value="Log in" /> </form></p> </body> </html> <?php exit; } $_SESSION['uid'] = $uid; $_SESSION['pwd'] = $pwd; mysql_connect("localhost", "root", ""); mysql_select_db("client"); $sql = "SELECT * FROM client WHERE nomclt = '$uid' AND motpasseclt = PASSWORD('$pwd')"; $result = mysql_query($sql) or die ('problème'); if (mysql_num_rows($result) == 0) { unset($_SESSION['uid']); unset($_SESSION['pwd']); ?> <!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> Access Denied </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <h1> Access Denied </h1> <p>Your user ID or password is incorrect, or you are not a registered user on this site. To try logging in again, click <a href="<?php $_SERVER['PHP_SELF'] ?>">here</a>. To register for instant access, click <a href="signup.php">here</a>.</p> </body> </html> <?php exit; } $username = mysql_result($result,0,'fullname'); ?>
Dès que j'ouvre la page, j'ai toujours les deux lignes d'erreurs suivantes
Notice: Undefined index: uid in C:\Program Files\EasyPHP5.2.10\www\accesscontrol\accesscontrol.php on line 6
Notice: Undefined index: pwd in C:\Program Files\EasyPHP5.2.10\www\accesscontrol\accesscontrol.php on line 7
Donc en gros il ne reconnait pas uid et pwd mais c'est normal non puisque les champs n'ont pas encore été remplis la première fois.
A voir également:
- Scipt session qui déconne
- Www.yahoomail.com ouverture de session - Forum Yahoo mail
- Teamviewer code de session expiré ✓ - Forum logiciel systeme
- Session invalide ou obsolète ✓ - Forum finances
- TeamViewer, quel risque de donner son le code - Forum Logiciels
- Veuillez ouvrir une session avec les privilèges du gestionnaire ✓ - Forum Windows
8 réponses
elles sont bizare ces phrases, mais peut-etre que je me trompe :
$uid = isset($_POST['uid']) ? $_POST['uid'] : $_SESSION['uid'];
$pwd = isset($_POST['pwd']) ? $_POST['pwd'] : $_SESSION['pwd'];
c'est un script dans le quel on indique son login et password ? qui sont verifié par une requette sql.
pourquoi envoyer l'action vers la page anterieur ? et non pas la page actuelle.
si tu mettais :
$uid = $_POST['uid'];
$pwd = $_POST['pwd'];
au lieu de :
$uid = isset($_POST['uid']) ? $_POST['uid'] : $_SESSION['uid'];
$pwd = isset($_POST['pwd']) ? $_POST['pwd'] : $_SESSION['pwd'];
qu'est ce que ça donne ?
$uid = isset($_POST['uid']) ? $_POST['uid'] : $_SESSION['uid'];
$pwd = isset($_POST['pwd']) ? $_POST['pwd'] : $_SESSION['pwd'];
c'est un script dans le quel on indique son login et password ? qui sont verifié par une requette sql.
pourquoi envoyer l'action vers la page anterieur ? et non pas la page actuelle.
si tu mettais :
$uid = $_POST['uid'];
$pwd = $_POST['pwd'];
au lieu de :
$uid = isset($_POST['uid']) ? $_POST['uid'] : $_SESSION['uid'];
$pwd = isset($_POST['pwd']) ? $_POST['pwd'] : $_SESSION['pwd'];
qu'est ce que ça donne ?
tiens je l'ai arrangé un peu ton script :
cependant ton script analyse les infos et rebalance des informations al'internaute si celui-ci n'est pas identifié, mais ou est l'action si celui-ci est identifié , je ne la vois pas ?
<?php session_start();
//accesscontrol.php
$uid = $_POST['uid'] ;
$pwd = $_POST['pwd'] ;
if(!isset($uid)) {
?>
<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> Please Log In for Access </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<h1> Login Required </h1>
<p>You must log in to access this area of the site. If you are
not a registered user, <a href="signup.php">click here</a>
to sign up for instant access!</p>
<p><form method="post" action="">
User ID: <input type="text" name="uid" size="8" /><br />
Password: <input type="password" name="pwd" SIZE="8" /><br />
<input type="submit" value="Log in" />
</form></p>
</body>
</html>
<?php
exit;
}
$_SESSION['uid'] = $uid;
$_SESSION['pwd'] = $pwd;
mysql_connect("localhost", "root", "");
mysql_select_db("client");
$sql = "SELECT * FROM client WHERE nomclt = '$uid' AND motpasseclt = PASSWORD('$pwd')";
$result = mysql_query($sql) or die ('problème');
if (mysql_num_rows($result) == 0) {
unset($_SESSION['uid']);
unset($_SESSION['pwd']);
?>
<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> Access Denied </title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />
</head>
<body>
<h1> Access Denied </h1>
<p>Your user ID or password is incorrect, or you are not a
registered user on this site. To try logging in again, click
<a href="<?php $_SERVER['PHP_SELF'] ?>">here</a>. To register for instant
access, click <a href="signup.php">here</a>.</p>
</body>
</html>
<?php
exit;
}
$username = mysql_result($result,0,'fullname');
?>
cependant ton script analyse les infos et rebalance des informations al'internaute si celui-ci n'est pas identifié, mais ou est l'action si celui-ci est identifié , je ne la vois pas ?
<?php session_start();
//accesscontrol.php
$uid = $_POST['uid'] ;
$pwd = $_POST['pwd'] ;
if(!isset($uid)) {
?>
<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> Please Log In for Access </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<h1> Login Required </h1>
<p>You must log in to access this area of the site. If you are
not a registered user, <a href="signup.php">click here</a>
to sign up for instant access!</p>
<p><form method="post" action="">
User ID: <input type="text" name="uid" size="8" /><br />
Password: <input type="password" name="pwd" SIZE="8" /><br />
<input type="submit" value="Log in" />
</form></p>
</body>
</html>
<?php
exit;
}
$_SESSION['uid'] = $uid;
$_SESSION['pwd'] = $pwd;
mysql_connect("localhost", "root", "");
mysql_select_db("client");
$sql = "SELECT * FROM client WHERE nomclt = '$uid' AND motpasseclt = PASSWORD('$pwd')";
$result = mysql_query($sql) or die ('problème');
if (mysql_num_rows($result) == 0) {
unset($_SESSION['uid']);
unset($_SESSION['pwd']);
?>
<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> Access Denied </title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />
</head>
<body>
<h1> Access Denied </h1>
<p>Your user ID or password is incorrect, or you are not a
registered user on this site. To try logging in again, click
<a href="<?php $_SERVER['PHP_SELF'] ?>">here</a>. To register for instant
access, click <a href="signup.php">here</a>.</p>
</body>
</html>
<?php
exit;
}
$username = mysql_result($result,0,'fullname');
?>
D'abord merci de prendre le temps de me guider lezo, ensuite je serais honnete avec toi, je cherchais des scripts sur le net pour l'authentification avec session et mysql, j'ai trouvé celui ci et je comptais l'adapter à mes besoins.
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
En fait j'ai une page d'accueuil ou il y a le formulaire d'acces, à qui je vais accoler ce script, une fois les variables entrées, au lieu de m'afficher le formulaire d'entrée des mdp et du login, j'aimerais qu'il affiche un bonjour + nom utilisateur.
donc tu comptes utiliser ce script (au dessus) pour identifier les utlisateurs et ensuite les rediriger vers la page voulu, c'est bien ça ?
Oui c'est bien ça, ce que je ne comprends pas lezo c'est pourquoi est ce ces lignes sortent toujours lors de la première visite de la page
Undefined index: uid in C:\Program Files\EasyPHP5.2.10\www\accesscontrol\accesscontrol.php on line 6
Notice: Undefined index: pwd in C:\Program Files\EasyPHP5.2.10\www\accesscontrol\accesscontrol.php on line 7
Par ailleurs voici ma page d'accueil ou il y a le formulaire
Je voudrais faire en sorte qu'une fois les donnés du formulaire transmise, si elles sont correctes et justes alors au lieu du formulaire precedent je voudrais voir un txte: Bienvenu + nom client sinon on affiche un message d'erreure pour reverifier les donnés.
Undefined index: uid in C:\Program Files\EasyPHP5.2.10\www\accesscontrol\accesscontrol.php on line 6
Notice: Undefined index: pwd in C:\Program Files\EasyPHP5.2.10\www\accesscontrol\accesscontrol.php on line 7
Par ailleurs voici ma page d'accueil ou il y a le formulaire
<HTML> <HEAD> <TITLE>7-029a</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251"> <style type="text/css"><!-- .header {font-family:Tahoma, sans-serif; font-size: 12px; COLOR:#2FFFFF; padding-left:10; padding-right:5; font-weight:900 } .text {font-family:Tahoma,sans-serif; font-size: 11px; color:#000000; padding-left:20; padding-right:10 } .text2 {font-family:Verdana,sans-serif; font-size: 10px; color:#ffffff; padding-left:20; padding-right:10 } .news {font-family:Arial, sans-serif; font-size: 9px; color:#ffffff; padding-left:10; padding-right:5; font-weight:900; } a:link{text-decoration: none; color:#ffffff} a:visited{text-decoration: none; color: #ffffff} a:hover{text-decoration: underline; color: #ffffff} a:active{text-decoration: none; color: #ffffff} li { list-style : url(file:///C|/Users/hp/Desktop/projet%20t/Html/images/pic.jpg); } --></style> </HEAD> <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 background="file:///C|/Users/hp/Desktop/projet t/Html/images/bg.jpg"> <form name="form1" action="accueuil2.html" method="post"> <TABLE WIDTH=780 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center" height=100% bgcolor="ffffff"> <TR><td bgcolor=#000000 rowspan=100><img src="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" with=1></td> <TD WIDTH=780 HEIGHT=174 COLSPAN=14> <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload2.macromedia.com/get/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="780" HEIGHT="218" id="0245_intro" ALIGN=""> <PARAM NAME=movie VALUE="file:///C|/Users/hp/Desktop/projet t/Html/0245_intro.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="file:///C|/Users/hp/Desktop/projet t/Html/0245_intro.swf" quality=high bgcolor=#FFFFFF WIDTH="780" HEIGHT="218" NAME="0245_intro" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="https://get.adobe.com/flashplayer/"></EMBED> </OBJECT></TD> <td bgcolor=#000000 rowspan=100><img src="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" with=1></td> </TR> <TR> <TD WIDTH=780 HEIGHT=29 COLSPAN=14> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/10.jpg" WIDTH=780 HEIGHT=29 ALT=""></TD> </TR> <TR> <TD WIDTH=140 HEIGHT=28 COLSPAN=3> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/11.jpg" WIDTH=140 HEIGHT=28 ALT=""></TD> <TD WIDTH=82 HEIGHT=28 COLSPAN=2> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/12.jpg" WIDTH=82 HEIGHT=28 ALT=""></TD> <TD COLSPAN=2 background="file:///C|/Users/hp/Desktop/projet t/Html/images/13.jpg" WIDTH=105 HEIGHT=28 ALT=""> <input type="text" style="width:100" name="uid"> </TD> <TD WIDTH=67 HEIGHT=28> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/14.jpg" WIDTH=67 HEIGHT=28 ALT=""></TD> <TD COLSPAN=2 background="file:///C|/Users/hp/Desktop/projet t/Html/images/15.jpg" WIDTH=101 HEIGHT=28 ALT=""> <input type="password" style="width:100" name="pwd"> </TD> <TD WIDTH=23 HEIGHT=28 COLSPAN=2><input name="submit" type="image" class="imgSubmit" src="file:///C|/Users/hp/Desktop/projet t/Html/images/16.jpg"></TD> <TD WIDTH=262 HEIGHT=28 COLSPAN=2> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/17.jpg" WIDTH=262 HEIGHT=28 ALT=""></TD> </TR> <TR> <TD WIDTH=780 HEIGHT=25 COLSPAN=14> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/18.jpg" WIDTH=780 HEIGHT=25 ALT=""></TD> </TR> <TR> <TD WIDTH=563 HEIGHT=100% valign="top" COLSPAN=13><div class="text"> <p><strong style="color:F3400F; font-size:15px">Meganet Industrie</strong><br> <strong>If you're interested in licensing or reselling in your country, please</strong></p><p> </p> <p><br> free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Also, if you would like to distribute a localized version E in your country, we'd be glad to assist you in translating into your language.International resellers/partners for distribution If you're interested in licensing or reselling in your country, please feel free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Also, if you would like to distribute a localized version E in your country, we'd be glad to assist you in translating into your language.International resellers/partners for distribution. <br><br> If you're interested in licensing or reselling in your country, please feel free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Also, if you would like to distribute a localized version E in your country, we'd be glad to assist you in translating into your language. </p> </div> </TD> <TD WIDTH=217 HEIGHT=100% valign="top" background="file:///C|/Users/hp/Desktop/projet t/Html/images/rbg.jpg"> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/r1.jpg"><br> <div class="text" style="padding-left:30"> <strong style="color:F3400F; font-size:15px">NEWS HEADER HERE</strong><br> </div> <div class="text" style="padding-left:30; padding-right:50"> <strong>If you're interested in licensing or reselling in your country, please</strong><br> free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Als <br><br style="font-size:5px"> <a href=""><IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/r2.jpg" border=0></a> </div> <br style="font-size:5px"> <div class="text" style="padding-left:30"> <strong style="color:F3400F; font-size:15px">NEWS HEADER HERE</strong><br> </div> <div class="text" style="padding-left:30; padding-right:50"> <strong>If you're interested in licensing or reselling in your country, please</strong><br> free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Als <br><br style="font-size:5px"> <a href=""><IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/r2.jpg" border=0></a> </div> </TD> </TR> <TR> <TD COLSPAN=14 background="file:///C|/Users/hp/Desktop/projet t/Html/images/21.jpg" WIDTH=780 HEIGHT=47 ALT=""> <div class="text" style="color:000000"> <strong> <a href="" style="color:000000"> HOME</a> <a href="" style="color:000000">NEWS</a> <a href="" style="color:000000">ABOUT</a> <a href="" style="color:000000">PRODUCTS </a> <a href="" style="color:000000">SERVICES </a> <a href="" style="color:000000"> PARTNERS </a> <a href="" style="color:000000">CONTACT US</a></strong> </div> </TD> </TR> <TR> <TD COLSPAN=14 background="file:///C|/Users/hp/Desktop/projet t/Html/images/22.jpg" WIDTH=780 HEIGHT=42 ALT=""> <div class="text"> Copyright © 2003 YourCompany Inc. All rights reserved. </div> </TD> </TR> <TR> <TD WIDTH=64 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=64 HEIGHT=1 ALT=""></TD> <TD WIDTH=58 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=58 HEIGHT=1 ALT=""></TD> <TD WIDTH=18 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=18 HEIGHT=1 ALT=""></TD> <TD WIDTH=40 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=40 HEIGHT=1 ALT=""></TD> <TD WIDTH=42 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=42 HEIGHT=1 ALT=""></TD> <TD WIDTH=29 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=29 HEIGHT=1 ALT=""></TD> <TD WIDTH=76 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=76 HEIGHT=1 ALT=""></TD> <TD WIDTH=67 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=67 HEIGHT=1 ALT=""></TD> <TD WIDTH=10 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=10 HEIGHT=1 ALT=""></TD> <TD WIDTH=91 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=91 HEIGHT=1 ALT=""></TD> <TD WIDTH=9 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=9 HEIGHT=1 ALT=""></TD> <TD WIDTH=14 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=14 HEIGHT=1 ALT=""></TD> <TD WIDTH=45 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=45 HEIGHT=1 ALT=""></TD> <TD WIDTH=217 HEIGHT=1> <IMG SRC="file:///C|/Users/hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=217 HEIGHT=1 ALT=""></TD> </TR> </TABLE> </form> </BODY> </HTML>
Je voudrais faire en sorte qu'une fois les donnés du formulaire transmise, si elles sont correctes et justes alors au lieu du formulaire precedent je voudrais voir un txte: Bienvenu + nom client sinon on affiche un message d'erreure pour reverifier les donnés.
Ben en fait il suffit d'ajouter le script de connexion php a la page au dessus.
en envoyant le formulaire sur elle meme et non pas vers une autre page, puis faire une action en fonction du resultat, il faudra tout de meme mettre les identifiants de ta bdd sql et avoir une table correspondante, ça devrait donner ça :
PS : pour ce qui est du message :
Undefined index: uid in C:\Program Files\EasyPHP5.2.10\www\accesscontrol\accesscontrol.php on line 6
cela vient de easy php, tu devrais essayer directement sur un serveur et non pas en local de chez toi avec easyphp
EXEMPLE SCRIPT :
<?php session_start();
//accesscontrol.php
$uid = $_POST['uid'] ;
$pwd = $_POST['pwd'] ;
mysql_connect("localhost", "root", "");
mysql_select_db("client");
$sql = "SELECT * FROM client WHERE nomclt = '$uid' AND motpasseclt = PASSWORD('$pwd')";
$result = mysql_query($sql) or die ('problème');
if (mysql_num_rows($result) == 0) {
echo $uid. "n'existe pas, veuillez vous inscrire." ;
}else{echo "Bienvenue : ".$uid ; $_SESSION['utilisateur'] = $uid ; }
?>
<HTML>
<HEAD>
<TITLE>7-029a</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251"> <style type="text/css"><!--
.header {font-family:Tahoma, sans-serif; font-size: 12px; COLOR:#2FFFFF; padding-left:10; padding-right:5; font-weight:900 }
.text {font-family:Tahoma,sans-serif; font-size: 11px; color:#000000; padding-left:20; padding-right:10 }
.text2 {font-family:Verdana,sans-serif; font-size: 10px; color:#ffffff; padding-left:20; padding-right:10 }
.news {font-family:Arial, sans-serif; font-size: 9px; color:#ffffff; padding-left:10; padding-right:5; font-weight:900; }
a:link{text-decoration: none; color:#ffffff}
a:visited{text-decoration: none; color: #ffffff}
a:hover{text-decoration: underline; color: #ffffff}
a:active{text-decoration: none; color: #ffffff}
li {
list-style : url(../../hp/Desktop/projet%20t/Html/images/pic.jpg);
}
--></style>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 background="../../hp/Desktop/projet t/Html/images/bg.jpg">
<form name="form1" action="" method="post">
<TABLE WIDTH=780 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center" height=100% bgcolor="ffffff">
<TR><td bgcolor=#000000 rowspan=100><img src="../../hp/Desktop/projet t/Html/images/spacer.gif" with=1></td>
<TD WIDTH=780 HEIGHT=174 COLSPAN=14>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://fpdownload2.macromedia.com/get/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="780" HEIGHT="218" id="0245_intro" ALIGN="">
<PARAM NAME=movie VALUE="../../hp/Desktop/projet t/Html/0245_intro.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="../../hp/Desktop/projet t/Html/0245_intro.swf" quality=high bgcolor=#FFFFFF WIDTH="780" HEIGHT="218" NAME="0245_intro" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="https://get.adobe.com/flashplayer/"></EMBED>
</OBJECT></TD>
<td bgcolor=#000000 rowspan=100><img src="../../hp/Desktop/projet t/Html/images/spacer.gif" with=1></td>
</TR>
<TR>
<TD WIDTH=780 HEIGHT=29 COLSPAN=14>
<IMG SRC="../../hp/Desktop/projet t/Html/images/10.jpg" WIDTH=780 HEIGHT=29 ALT=""></TD>
</TR>
<TR>
<TD WIDTH=140 HEIGHT=28 COLSPAN=3>
<IMG SRC="../../hp/Desktop/projet t/Html/images/11.jpg" WIDTH=140 HEIGHT=28 ALT=""></TD>
<TD WIDTH=82 HEIGHT=28 COLSPAN=2>
<IMG SRC="../../hp/Desktop/projet t/Html/images/12.jpg" WIDTH=82 HEIGHT=28 ALT=""></TD>
<TD COLSPAN=2 background="../../hp/Desktop/projet t/Html/images/13.jpg" WIDTH=105 HEIGHT=28 ALT="">
<input type="text" style="width:100" name="uid">
</TD>
<TD WIDTH=67 HEIGHT=28>
<IMG SRC="../../hp/Desktop/projet t/Html/images/14.jpg" WIDTH=67 HEIGHT=28 ALT=""></TD>
<TD COLSPAN=2 background="../../hp/Desktop/projet t/Html/images/15.jpg" WIDTH=101 HEIGHT=28 ALT="">
<input type="password" style="width:100" name="pwd">
</TD>
<TD WIDTH=23 HEIGHT=28 COLSPAN=2><input name="submit" type="image" class="imgSubmit" src="../../hp/Desktop/projet t/Html/images/16.jpg"></TD>
<TD WIDTH=262 HEIGHT=28 COLSPAN=2>
<IMG SRC="../../hp/Desktop/projet t/Html/images/17.jpg" WIDTH=262 HEIGHT=28 ALT=""></TD>
</TR>
<TR>
<TD WIDTH=780 HEIGHT=25 COLSPAN=14>
<IMG SRC="../../hp/Desktop/projet t/Html/images/18.jpg" WIDTH=780 HEIGHT=25 ALT=""></TD>
</TR>
<TR>
<TD WIDTH=563 HEIGHT=100% valign="top" COLSPAN=13><div class="text">
<p><strong style="color:F3400F; font-size:15px">Meganet Industrie</strong><br>
<strong>If you're interested in licensing or reselling in your country, please</strong></p><p> </p>
<p><br>
free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Also, if you would like to distribute a localized version E in your country, we'd be glad to assist you in translating into your language.International resellers/partners for distribution If you're interested in licensing or reselling in your country, please feel free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Also, if you would like to distribute a localized version E in your country, we'd be glad to assist you in translating into your language.International resellers/partners for distribution.
<br><br>
If you're interested in licensing or reselling in your country, please feel free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Also, if you would like to distribute a localized version E in your country, we'd be glad to assist you in translating into your language.
</p>
</div>
</TD>
<TD WIDTH=217 HEIGHT=100% valign="top" background="../../hp/Desktop/projet t/Html/images/rbg.jpg">
<IMG SRC="../../hp/Desktop/projet t/Html/images/r1.jpg"><br>
<div class="text" style="padding-left:30">
<strong style="color:F3400F; font-size:15px">NEWS HEADER HERE</strong><br>
</div>
<div class="text" style="padding-left:30; padding-right:50">
<strong>If you're interested in licensing or reselling in your country, please</strong><br>
free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Als
<br><br style="font-size:5px">
<a href=""><IMG SRC="../../hp/Desktop/projet t/Html/images/r2.jpg" border=0></a>
</div>
<br style="font-size:5px">
<div class="text" style="padding-left:30">
<strong style="color:F3400F; font-size:15px">NEWS HEADER HERE</strong><br>
</div>
<div class="text" style="padding-left:30; padding-right:50">
<strong>If you're interested in licensing or reselling in your country, please</strong><br>
free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Als
<br><br style="font-size:5px">
<a href=""><IMG SRC="../../hp/Desktop/projet t/Html/images/r2.jpg" border=0></a>
</div>
</TD>
</TR>
<TR>
<TD COLSPAN=14 background="../../hp/Desktop/projet t/Html/images/21.jpg" WIDTH=780 HEIGHT=47 ALT="">
<div class="text" style="color:000000">
<strong> <a href="" style="color:000000"> HOME</a> <a href="" style="color:000000">NEWS</a> <a href="" style="color:000000">ABOUT</a> <a href="" style="color:000000">PRODUCTS </a> <a href="" style="color:000000">SERVICES </a> <a href="" style="color:000000"> PARTNERS </a> <a href="" style="color:000000">CONTACT US</a></strong>
</div>
</TD>
</TR>
<TR>
<TD COLSPAN=14 background="../../hp/Desktop/projet t/Html/images/22.jpg" WIDTH=780 HEIGHT=42 ALT="">
<div class="text">
Copyright © 2003 YourCompany Inc. All rights reserved.
</div>
</TD>
</TR>
<TR>
<TD WIDTH=64 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=64 HEIGHT=1 ALT=""></TD>
<TD WIDTH=58 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=58 HEIGHT=1 ALT=""></TD>
<TD WIDTH=18 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=18 HEIGHT=1 ALT=""></TD>
<TD WIDTH=40 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=40 HEIGHT=1 ALT=""></TD>
<TD WIDTH=42 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=42 HEIGHT=1 ALT=""></TD>
<TD WIDTH=29 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=29 HEIGHT=1 ALT=""></TD>
<TD WIDTH=76 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=76 HEIGHT=1 ALT=""></TD>
<TD WIDTH=67 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=67 HEIGHT=1 ALT=""></TD>
<TD WIDTH=10 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=10 HEIGHT=1 ALT=""></TD>
<TD WIDTH=91 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=91 HEIGHT=1 ALT=""></TD>
<TD WIDTH=9 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=9 HEIGHT=1 ALT=""></TD>
<TD WIDTH=14 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=14 HEIGHT=1 ALT=""></TD>
<TD WIDTH=45 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=45 HEIGHT=1 ALT=""></TD>
<TD WIDTH=217 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=217 HEIGHT=1 ALT=""></TD>
</TR>
</TABLE>
</form>
</BODY>
</HTML>
lezao : quand tu sais pas , tu me demandes je sais tout....non je déconne...presque tout.
en envoyant le formulaire sur elle meme et non pas vers une autre page, puis faire une action en fonction du resultat, il faudra tout de meme mettre les identifiants de ta bdd sql et avoir une table correspondante, ça devrait donner ça :
PS : pour ce qui est du message :
Undefined index: uid in C:\Program Files\EasyPHP5.2.10\www\accesscontrol\accesscontrol.php on line 6
cela vient de easy php, tu devrais essayer directement sur un serveur et non pas en local de chez toi avec easyphp
EXEMPLE SCRIPT :
<?php session_start();
//accesscontrol.php
$uid = $_POST['uid'] ;
$pwd = $_POST['pwd'] ;
mysql_connect("localhost", "root", "");
mysql_select_db("client");
$sql = "SELECT * FROM client WHERE nomclt = '$uid' AND motpasseclt = PASSWORD('$pwd')";
$result = mysql_query($sql) or die ('problème');
if (mysql_num_rows($result) == 0) {
echo $uid. "n'existe pas, veuillez vous inscrire." ;
}else{echo "Bienvenue : ".$uid ; $_SESSION['utilisateur'] = $uid ; }
?>
<HTML>
<HEAD>
<TITLE>7-029a</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251"> <style type="text/css"><!--
.header {font-family:Tahoma, sans-serif; font-size: 12px; COLOR:#2FFFFF; padding-left:10; padding-right:5; font-weight:900 }
.text {font-family:Tahoma,sans-serif; font-size: 11px; color:#000000; padding-left:20; padding-right:10 }
.text2 {font-family:Verdana,sans-serif; font-size: 10px; color:#ffffff; padding-left:20; padding-right:10 }
.news {font-family:Arial, sans-serif; font-size: 9px; color:#ffffff; padding-left:10; padding-right:5; font-weight:900; }
a:link{text-decoration: none; color:#ffffff}
a:visited{text-decoration: none; color: #ffffff}
a:hover{text-decoration: underline; color: #ffffff}
a:active{text-decoration: none; color: #ffffff}
li {
list-style : url(../../hp/Desktop/projet%20t/Html/images/pic.jpg);
}
--></style>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 background="../../hp/Desktop/projet t/Html/images/bg.jpg">
<form name="form1" action="" method="post">
<TABLE WIDTH=780 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center" height=100% bgcolor="ffffff">
<TR><td bgcolor=#000000 rowspan=100><img src="../../hp/Desktop/projet t/Html/images/spacer.gif" with=1></td>
<TD WIDTH=780 HEIGHT=174 COLSPAN=14>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://fpdownload2.macromedia.com/get/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="780" HEIGHT="218" id="0245_intro" ALIGN="">
<PARAM NAME=movie VALUE="../../hp/Desktop/projet t/Html/0245_intro.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="../../hp/Desktop/projet t/Html/0245_intro.swf" quality=high bgcolor=#FFFFFF WIDTH="780" HEIGHT="218" NAME="0245_intro" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="https://get.adobe.com/flashplayer/"></EMBED>
</OBJECT></TD>
<td bgcolor=#000000 rowspan=100><img src="../../hp/Desktop/projet t/Html/images/spacer.gif" with=1></td>
</TR>
<TR>
<TD WIDTH=780 HEIGHT=29 COLSPAN=14>
<IMG SRC="../../hp/Desktop/projet t/Html/images/10.jpg" WIDTH=780 HEIGHT=29 ALT=""></TD>
</TR>
<TR>
<TD WIDTH=140 HEIGHT=28 COLSPAN=3>
<IMG SRC="../../hp/Desktop/projet t/Html/images/11.jpg" WIDTH=140 HEIGHT=28 ALT=""></TD>
<TD WIDTH=82 HEIGHT=28 COLSPAN=2>
<IMG SRC="../../hp/Desktop/projet t/Html/images/12.jpg" WIDTH=82 HEIGHT=28 ALT=""></TD>
<TD COLSPAN=2 background="../../hp/Desktop/projet t/Html/images/13.jpg" WIDTH=105 HEIGHT=28 ALT="">
<input type="text" style="width:100" name="uid">
</TD>
<TD WIDTH=67 HEIGHT=28>
<IMG SRC="../../hp/Desktop/projet t/Html/images/14.jpg" WIDTH=67 HEIGHT=28 ALT=""></TD>
<TD COLSPAN=2 background="../../hp/Desktop/projet t/Html/images/15.jpg" WIDTH=101 HEIGHT=28 ALT="">
<input type="password" style="width:100" name="pwd">
</TD>
<TD WIDTH=23 HEIGHT=28 COLSPAN=2><input name="submit" type="image" class="imgSubmit" src="../../hp/Desktop/projet t/Html/images/16.jpg"></TD>
<TD WIDTH=262 HEIGHT=28 COLSPAN=2>
<IMG SRC="../../hp/Desktop/projet t/Html/images/17.jpg" WIDTH=262 HEIGHT=28 ALT=""></TD>
</TR>
<TR>
<TD WIDTH=780 HEIGHT=25 COLSPAN=14>
<IMG SRC="../../hp/Desktop/projet t/Html/images/18.jpg" WIDTH=780 HEIGHT=25 ALT=""></TD>
</TR>
<TR>
<TD WIDTH=563 HEIGHT=100% valign="top" COLSPAN=13><div class="text">
<p><strong style="color:F3400F; font-size:15px">Meganet Industrie</strong><br>
<strong>If you're interested in licensing or reselling in your country, please</strong></p><p> </p>
<p><br>
free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Also, if you would like to distribute a localized version E in your country, we'd be glad to assist you in translating into your language.International resellers/partners for distribution If you're interested in licensing or reselling in your country, please feel free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Also, if you would like to distribute a localized version E in your country, we'd be glad to assist you in translating into your language.International resellers/partners for distribution.
<br><br>
If you're interested in licensing or reselling in your country, please feel free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Also, if you would like to distribute a localized version E in your country, we'd be glad to assist you in translating into your language.
</p>
</div>
</TD>
<TD WIDTH=217 HEIGHT=100% valign="top" background="../../hp/Desktop/projet t/Html/images/rbg.jpg">
<IMG SRC="../../hp/Desktop/projet t/Html/images/r1.jpg"><br>
<div class="text" style="padding-left:30">
<strong style="color:F3400F; font-size:15px">NEWS HEADER HERE</strong><br>
</div>
<div class="text" style="padding-left:30; padding-right:50">
<strong>If you're interested in licensing or reselling in your country, please</strong><br>
free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Als
<br><br style="font-size:5px">
<a href=""><IMG SRC="../../hp/Desktop/projet t/Html/images/r2.jpg" border=0></a>
</div>
<br style="font-size:5px">
<div class="text" style="padding-left:30">
<strong style="color:F3400F; font-size:15px">NEWS HEADER HERE</strong><br>
</div>
<div class="text" style="padding-left:30; padding-right:50">
<strong>If you're interested in licensing or reselling in your country, please</strong><br>
free to contact us We offer exclusive licensing or reseller volume rates, depending on your marketing approach. Als
<br><br style="font-size:5px">
<a href=""><IMG SRC="../../hp/Desktop/projet t/Html/images/r2.jpg" border=0></a>
</div>
</TD>
</TR>
<TR>
<TD COLSPAN=14 background="../../hp/Desktop/projet t/Html/images/21.jpg" WIDTH=780 HEIGHT=47 ALT="">
<div class="text" style="color:000000">
<strong> <a href="" style="color:000000"> HOME</a> <a href="" style="color:000000">NEWS</a> <a href="" style="color:000000">ABOUT</a> <a href="" style="color:000000">PRODUCTS </a> <a href="" style="color:000000">SERVICES </a> <a href="" style="color:000000"> PARTNERS </a> <a href="" style="color:000000">CONTACT US</a></strong>
</div>
</TD>
</TR>
<TR>
<TD COLSPAN=14 background="../../hp/Desktop/projet t/Html/images/22.jpg" WIDTH=780 HEIGHT=42 ALT="">
<div class="text">
Copyright © 2003 YourCompany Inc. All rights reserved.
</div>
</TD>
</TR>
<TR>
<TD WIDTH=64 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=64 HEIGHT=1 ALT=""></TD>
<TD WIDTH=58 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=58 HEIGHT=1 ALT=""></TD>
<TD WIDTH=18 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=18 HEIGHT=1 ALT=""></TD>
<TD WIDTH=40 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=40 HEIGHT=1 ALT=""></TD>
<TD WIDTH=42 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=42 HEIGHT=1 ALT=""></TD>
<TD WIDTH=29 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=29 HEIGHT=1 ALT=""></TD>
<TD WIDTH=76 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=76 HEIGHT=1 ALT=""></TD>
<TD WIDTH=67 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=67 HEIGHT=1 ALT=""></TD>
<TD WIDTH=10 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=10 HEIGHT=1 ALT=""></TD>
<TD WIDTH=91 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=91 HEIGHT=1 ALT=""></TD>
<TD WIDTH=9 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=9 HEIGHT=1 ALT=""></TD>
<TD WIDTH=14 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=14 HEIGHT=1 ALT=""></TD>
<TD WIDTH=45 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=45 HEIGHT=1 ALT=""></TD>
<TD WIDTH=217 HEIGHT=1>
<IMG SRC="../../hp/Desktop/projet t/Html/images/spacer.gif" WIDTH=217 HEIGHT=1 ALT=""></TD>
</TR>
</TABLE>
</form>
</BODY>
</HTML>
lezao : quand tu sais pas , tu me demandes je sais tout....non je déconne...presque tout.