View Single Post
  #4  
Old 09-06-2008, 12:10
léa léa is offline
Membre junior
 
Join Date: 07-06-2008
Posts: 2
PASS et 86XXX, considerant ke je c même pas ce que c'est je repondrais non, j'ai commencé la première page du projet; ca donne;
PHP Code:
<?php
session_start
() ;
//titre de présentation
echo "Identification de la personne"
//formulaire permettant l'identification de l'étudiant
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[URL]http://www.w3.org/1999/xhtml[/URL]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Identification</title>
</head>
<body>
  
 <?php
if (isset($_POST['id_etudiant']) && (isset($_POST['mdp_etudiant'])) )
  {
  
$_SESSION['id_etudiant'] = $_POST['id_etudiant'] ;
  
$_SESSION['mdp_etudiant'] = $_POST['mdp_etudiant'] ;
  
$maconnexion mysql_connect('localhost','root','');
  
mysql_select_db('projet');
  
$resultat mysql_query("select * from etudiants where identifiant='".$_SESSION['id_etudiant']."' and mdp=".$_SESSION['mdp_etudiant']);
  
    if (
mysql_num_rows($resultat)==0)
    {
    
?>
    <form action="page_1.php"method="post">
    Erreur d'identifiant ou de mot de passe <br/>
    Entrez a nouveau votre identifiant : <input name="id_etudiant" type="text"/> <br/>
    Entrez a nouveau votre mot de passe : <input name="mdp_etudiant" type="password"/> <br/>
    <input type="submit" value="s'identifier" name="bouton" id="bouton"/>
    <?php
    
}
    else
    {
    echo 
"<script language='javascript' type='text/javascript'> ";
 echo 
"window.location.replace('Menu.php'); </script> ";
    }
  }
  else
  {
  
?>
  <form action="page_1.php"method="post">
 Entrez votre identifiant: <input name="id_etudiant" type="text"/> <br/>
 Entrez votre mot de passe : <input name="mdp_etudiant" type="password"/>
 <input type="submit" value="s'identifier" name="bouton" id="bouton"/>
  <?php
  
}
  
?></body>
</html>
Merci de t'interesser a mon cas Knux!

Last edited by Benjy; 09-06-2008 at 21:08. Reason: Parce qu'il y a des balises PHP...
Reply With Quote