bonjour,
j'ai un petit formulaire
explication.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
<p>je poss&egrave;de un code d'acc&eacute;s</p>
<form action="acces2.php" method="post">
  code d'acces: 
  <input type="text" name="admini" maxlength="6"/><br/>
 
<p> mot de passe: 
  <input type="password" name="motpasse" maxlength="6"/> 
   <p>
     <input type="submit" value="Enregistrer"/>
   </form>
</p>
qui envoi
acces2.php

à
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
	session_start();
	//Initialisation erreur
 
include ("motpasse.php");
 
if($_POST['admini'] =='$admini' and $_POST['motpasse'] =='$motpasse' )
{header("location: simulation_credits1bis.php");}
 
elseif ($_POST['admini'] =='$admini2' and $_POST['motpasse'] =='$motpasse2') 
{header("location: simulation_credits1bis.php");}
 
elseif ($_POST['admini'] =='$admini3' or $_POST['motpasse'] =='$motpasse3')
{header("location: simulation_credits1bis.php");}
 
elseif ($_POST['admini'] =='$admini4' or $_POST['motpasse'] =='$motpasse4')
{header("location: simulation_credits1bis.php");}
 
else 
{header("location: explication.php");}
 
?>
et qui devrait transferer à simulationcredits1bis.php
(code de motpass.php pour info)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
$admini=="essai";
 
$motpasse=="111111";
 
$admini2=="essai2";
 
$motpasse2=="222222";
 
 
$admini3=="essai3";
 
$motpasse3=="333333";
 
 
$admini4=="essai4";
 
$motpasse4=="444444";
?>
or, cela envoi systematiquement à mon formulaire explication.php
erreur simple probablement mais je ne trouve pas
merci pour votre aide