Pb avec Wamp 1.4.5a

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : Pb avec Wamp 1.4.5a

par charabia » 12 mai 2006, 15:42

oki pas de souci ;) tiens moi au courant.

Bon courage

par Galliwok » 12 mai 2006, 14:53

Je vais ouvrir un nouveau sujet dans les bases SQL.

Sinon, je vais m'installer Wamp 1.5.0.
C'est la dernière qui ne soit pas en Apache 2.

En tout cas merci pour tout.

Dès que j'ai la solution, je te tiens informé.

par charabia » 12 mai 2006, 14:51

Dans ce cas...poses plutôt un sujet dans SQL/BDD ou installes une version un peu plus récente comme la 1.6.1 qui marche très bien pour voir s'il s'agit bien de ça ;)

par Galliwok » 12 mai 2006, 14:49

Pareil.....c'est à dire rien.

Mais tu sais, comme mon script fonctionnait avec la précédente version de Wamp, je pencherais plutot pour un fichier de paramètre.

Pour info, j'ai déjà procédé à d'autre mises à jour de Wamp par le passé mais sans problème.
Mais peut-être qu'à partir de cette version, il y a une manip particulière ou un paramètre à renseigner...

par charabia » 12 mai 2006, 14:44

arf ! bon on va essayer doucement pour repérer l'erreur.

Essaies ceci :
if (isset($_POST['Btn_Valider']) && $_POST['Btn_Valider']=="Connexion")

par Galliwok » 12 mai 2006, 14:43

J'ai réduit le code HTML à sa plus simple expression et toujours pareil.

Code : Tout sélectionner

<html> <body bgcolor="#ffffff" link="#ff0000" vlink="#0000ff" text="#000000" background="back.gif" topmargin=0 leftmargin=0> <form action="ConnexionProspect.php" method="post" name="formulaire"> <a name=top></a> <p align=center><center><font face="Times New Roman" color=#000000 size=2>Saisissez votre nom d'utilisateur<br></font> <td width=136 height=23 colspan=2 rowspan=2 valign=top align=left> <input type="text" name="Login" maxlength=255 size=16 value=""> <p align=center><center><font face="Times New Roman" color=#000000 size=2>Saisissez votre mot de passe<br></font> <td width=136 height=23 colspan=2 rowspan=2 valign=top align=left> <input type="password" name="Mot_de_passe" maxlength=255 size=16 value=""> <td width=131 height=23 colspan=4 rowspan=1 valign=top align=left> <input type="submit" name="Btn_Valider" value="Connexion"> <a name=bottom></a> </form> </body> </html>

par Galliwok » 12 mai 2006, 14:40

Supprimé mais toujours pareil.

par charabia » 12 mai 2006, 14:35

J'ai remarqué une chose. Pourquoi as-tu le enctype="multipart/form-data" dans ton formulaire alors qu'il n'y a pas de fichiers à joindre ?

Supprimes le et regardes si ce n'est pas à cause de ça.

par Galliwok » 12 mai 2006, 14:28

Rien ne se passe....

Ca se comporte comme avant...

par charabia » 12 mai 2006, 14:24

Faut voir étape par étape dans ce cas.

Si tu fais juste :
// VERIFICATION SI LE LOGIN ET LE MOT DE PASSE SONT CORRECT 
if (isset($_POST['Btn_Valider']) && $_POST['Btn_Valider'] != "") 
{ 
echo "ok";
} 
else 
{ 
echo "nonok";
}
Verdict ?

par Galliwok » 12 mai 2006, 14:22

Ca marche pas non plus.

Ce n'est pas un problème avec SQL car même avec uniquement le code ci-dessous, ca ne marche pas :
// OUVERTURE DE LA SESSION AVEC ACCES A LA BASE DES PROSPECTS
session_start();
include("Config.inc.php");
if ($ressource == false)
{
exit();
}

// VERIFICATION SI LE LOGIN ET LE MOT DE PASSE SONT CORRECT
if (isset($_POST['Btn_Valider']) && $_POST['Btn_Valider'] != "")
{
header("Location: Liste_Prospects.php");
}
else
{
header("Location: Erreur_Connexion.php");
}

par charabia » 12 mai 2006, 14:15

et ça ?
<?php
// OUVERTURE DE LA SESSION AVEC ACCES A LA BASE DES PROSPECTS 
session_start();
include("Config.inc.php");
if ($ressource == false)
{
    exit();
}

// SAISIE DU LOGIN ET DU MOT DE PASSE
if(isset($_POST['Login']))
	$Login = $_POST['Login'];
else
	$Login = "";
	
if(isset($_POST['Mot_de_passe']))
	$Paswd = $_POST['Mot_de_passe'];
else
	$Paswd = "";

// Drapeau de Modification servant à savoir si l'on revient de l'écran de Modification
$_SESSION['modif'] = 0;
$_SESSION['debut_liste'] = 0;

// Initialisation de variables globales servant à la recherche des Prospects
$_SESSION['Nom'] = '';
$_SESSION['CP'] = '';
$_SESSION['Ville'] = '';
$_SESSION['Site'] = '';
$_SESSION['Succursale'] = '1';
$_SESSION['Structure'] = '1';
$_SESSION['Service'] = '1';
$_SESSION['Fonction'] = '1';

// Variable Globale utile pour le tri Ascendant et Descendant des colonnes
$_SESSION['Tri_Visite'] = 'DESC';

// CVariable Globale servant à compter les pages dans la liste des prospects
$_SESSION['num_page'] = 1;

// VERIFICATION SI LE LOGIN ET LE MOT DE PASSE SONT CORRECT
if (isset($_POST['Btn_Valider']) && $_POST['Btn_Valider'] != "")
{ 
    $Sql = "SELECT Login, Password, Code_Comm, Nom_Comm, Prenom_Comm FROM Utilisateur 
            WHERE Login = '".$Login."' AND Password = '".$Paswd."'";
    $Resultat = mysqli_query($ressource, $Sql);
	$nbligne = mysqli_num_rows($Resultat);
    if($nbligne != 0)
    {
        $_SESSION['Login'] = $Login;
        $_SESSION['Nom_Comm'] = $Tab['Nom_Comm'];
        $_SESSION['Prenom_Comm'] = $Tab['Prenom_Comm'];
        $_SESSION['Code_Comm'] = $Tab['Code_Comm'];
        header("Location: Liste_Prospects.php");
    }
    else
    {
        header("Location: Erreur_Connexion.php");
    }
    mysqli_close($ressource);
}
?>
J'ai utilisé mysqli_num_rows pour calculer le nombre d'enregistrement retourné. Si c'est différent de 0 alors un enregistrement existe donc c'est ok, sinon erreur.

par Galliwok » 12 mai 2006, 12:04

non c'est bien ConnexionProspect.php comme indiqué dans le form.

Sinon, ben ca marche pas non plus le code que tu m'as indiqué.
Même effet.
Je ne suis pas redirigé.

par charabia » 12 mai 2006, 11:54

Le forum est là pour ça ;)

Essaies ceci :
<?php
// OUVERTURE DE LA SESSION AVEC ACCES A LA BASE DES PROSPECTS 
session_start();
include("Config.inc.php");
if ($ressource == false)
{
    exit();
}

// SAISIE DU LOGIN ET DU MOT DE PASSE
if( isset($_POST['Login']) && $_POST['Login']!="" )
	$Login = $_POST['Login'];
else
	$Login = "";
	
if(isset($_POST['Mot_de_passe']) && $_POST['Mot_de_passe']!="" )
	$Paswd = $_POST['Mot_de_passe'];
else
	$Paswd = "";

// Drapeau de Modification servant à savoir si l'on revient de l'écran de Modification
$_SESSION['modif'] = 0;
$_SESSION['debut_liste'] = 0;

// Initialisation de variables globales servant à la recherche des Prospects
$_SESSION['Nom'] = '';
$_SESSION['CP'] = '';
$_SESSION['Ville'] = '';
$_SESSION['Site'] = '';
$_SESSION['Succursale'] = '1';
$_SESSION['Structure'] = '1';
$_SESSION['Service'] = '1';
$_SESSION['Fonction'] = '1';

// Variable Globale utile pour le tri Ascendant et Descendant des colonnes
$_SESSION['Tri_Visite'] = 'DESC';

// CVariable Globale servant à compter les pages dans la liste des prospects
$_SESSION['num_page'] = 1;

// VERIFICATION SI LE LOGIN ET LE MOT DE PASSE SONT CORRECT
if (isset($_POST['Btn_Valider']) && $_POST['Btn_Valider'] != "")
{ 
    $Sql = "SELECT Login, Password, Code_Comm, Nom_Comm, Prenom_Comm FROM Utilisateur 
            WHERE Login = '".$Login."' AND Password = '".$Paswd."'";
    $Resultat = mysqli_query($ressource, $Sql);
    if ($Tab = mysqli_fetch_assoc($Resultat))
    {
        $_SESSION['Login'] = $Login;
        $_SESSION['Nom_Comm'] = $Tab['Nom_Comm'];
        $_SESSION['Prenom_Comm'] = $Tab['Prenom_Comm'];
        $_SESSION['Code_Comm'] = $Tab['Code_Comm'];
        header("Location: Liste_Prospects.php");
    }
    else
    {
        header("Location: Erreur_Connexion.php");
    }
    mysqli_close($ressource);
}
?>
Autre chose, ton form redirige vers ConnexionProspect.php. C'est connexion.php ou ConnexionProspect.php ?

par Galliwok » 12 mai 2006, 11:47

OK
en tout cas merci pour le temps que tu me consacres.
<?
// OUVERTURE DE LA SESSION AVEC ACCES A LA BASE DES PROSPECTS
session_start();
include("Config.inc.php");
if ($ressource == false)
{
    exit();
}

// SAISIE DU LOGIN ET DU MOT DE PASSE
$Login = $_POST[Login];
$Paswd = $_POST[Mot_de_passe];

// Drapeau de Modification servant à savoir si l'on revient de l'écran de Modification
$_SESSION['modif'] = 0;
$_SESSION['debut_liste'] = 0;

// Initialisation de variables globales servant à la recherche des Prospects
$_SESSION['Nom']        = '';
$_SESSION['CP']         = '';
$_SESSION['Ville']      = '';
$_SESSION['Site']       = '';
$_SESSION['Succursale'] = '1';
$_SESSION['Structure']  = '1';
$_SESSION['Service']    = '1';
$_SESSION['Fonction']   = '1';

// Variable Globale utile pour le tri Ascendant et Descendant des colonnes
$_SESSION['Tri_Visite'] = 'DESC';

// CVariable Globale servant à compter les pages dans la liste des prospects
$_SESSION['num_page'] = 1;

// VERIFICATION SI LE LOGIN ET LE MOT DE PASSE SONT CORRECT
if ($_POST[Btn_Valider] != "")
{
    $Sql = "SELECT Login, Password, Code_Comm, Nom_Comm, Prenom_Comm FROM Utilisateur
            WHERE Login = '".$Login."' AND Password = '".$Paswd."'";
    $Resultat = mysqli_query ($ressource, $Sql);
    if ($Tab = mysqli_fetch_assoc($Resultat))
    {
        $_SESSION['Login']       = $Login;
        $_SESSION['Nom_Comm']    = $Tab['Nom_Comm'];
        $_SESSION['Prenom_Comm'] = $Tab['Prenom_Comm'];
        $_SESSION['Code_Comm']   = $Tab['Code_Comm'];
        header("Location: Liste_Prospects.php");
    }
    else
    {
        header("Location: Erreur_Connexion.php");
    }
    mysqli_close ($ressource);
}
?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Connectez-vous !!!</title>
</head>
<body bgcolor="#ffffff" link="#ff0000" vlink="#0000ff" text="#000000" background="back.gif"  topmargin=0 leftmargin=0>
<form action="ConnexionProspect.php" method="post" name="formulaire" enctype="multipart/form-data">
<a name=top></a>

<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td><img src="blnk.gif" width=9 height=1></td>
<td><img src="blnk.gif" width=172 height=1></td>
<td><img src="blnk.gif" width=9 height=1></td>
<td><img src="blnk.gif" width=126 height=1></td>
<td><img src="blnk.gif" width=137 height=1></td>
<td><img src="blnk.gif" width=30 height=1></td>
<td><img src="blnk.gif" width=18 height=1></td>
<td><img src="blnk.gif" width=1 height=1></td>
<td><img src="blnk.gif" width=82 height=1></td>
<td><img src="blnk.gif" width=54 height=1></td>
<td><img src="blnk.gif" width=165 height=1></td>
<td><img src="blnk.gif" width=132 height=1></td>
</tr>
<tr>
<td width=9 height=19></td>
<td width=172></td>
<td width=9></td>
<td width=126></td>
<td width=137></td>
<td width=30></td>
<td width=18></td>
<td width=1></td>
<td width=82></td>
<td width=54></td>
<td width=165></td>
<td width=132></td>
</tr>
<tr>
<td height=29></td>
<td width=926 height=29 colspan=11 rowspan=1 valign=top align=left>
<img width=926 height=29 border=0 src="entete.gif"></td>
</tr>
<tr>
<td height=4></td>
<td colspan=11></td>
</tr>
<tr>
<td height=61></td>
<td width=181 height=61 colspan=2 rowspan=1 valign=top align=left>
<img width=181 height=61 border=0 src="logo_proteor.gif"></td>
<td colspan=9></td>
</tr>
<tr>
<td height=7></td>
<td colspan=11></td>
</tr>
<tr>
<td height=46></td>
<td></td>
<td width=622 height=46 colspan=9 rowspan=1 valign=top align=left>

<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=3 height=3></td>
<td width=614></td>
<td width=3></td>
</tr>
<tr>
<td height=37></td>
<td width=614 height=37 valign=top align=left>

<p align=center><center><font face="Georgia" color=#000000 size=6><I>Connectez-vous !!!<br></I></font>
</td>
<td></td>
</tr>
<tr>
<td height=3></td>
<td colspan=2></td>
</tr>
</table>

</td>
<td></td>
</tr>
<tr>
<td height=38></td>
<td colspan=11></td>
</tr>
<tr>
<td height=22></td>
<td colspan=3></td>
<td width=185 height=22 colspan=3 rowspan=1 valign=top align=left>

<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=3 height=3></td>
<td width=177></td>
<td width=3></td>
</tr>
<tr>
<td height=15></td>
<td width=177 height=15 valign=top align=left>

<p align=center><center><font face="Times New Roman" color=#000000 size=2>Saisissez votre nom d'utilisateur<br></font>
</td>
<td></td>
</tr>
<tr>
<td height=3></td>
<td colspan=2></td>
</tr>
</table>

</td>
<td></td>
<td width=136 height=23 colspan=2 rowspan=2 valign=top align=left>
<input type="text" name="Login" maxlength=255 size=16 value="">
</td>
<td colspan=2></td>
</tr>
<tr>
<td height=1></td>
<td colspan=7></td>
<td colspan=2></td>
</tr>
<tr>
<td height=11></td>
<td colspan=11></td>
</tr>
<tr>
<td height=22></td>
<td colspan=3></td>
<td width=167 height=22 colspan=2 rowspan=1 valign=top align=left>

<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=3 height=3></td>
<td width=158></td>
<td width=3></td>
</tr>
<tr>
<td height=15></td>
<td width=158 height=15 valign=top align=left>

<p align=center><center><font face="Times New Roman" color=#000000 size=2>Saisissez votre mot de passe<br></font>
</td>
<td></td>
</tr>
<tr>
<td height=3></td>
<td colspan=2></td>
</tr>
</table>

</td>
<td colspan=2></td>
<td width=136 height=23 colspan=2 rowspan=2 valign=top align=left>
<input type="password" name="Mot_de_passe" maxlength=255 size=16 value="">
</td>
<td colspan=2></td>
</tr>
<tr>
<td height=1></td>
<td colspan=7></td>
<td colspan=2></td>
</tr>
<tr>
<td height=11></td>
<td colspan=11></td>
</tr>
<tr>
<td height=23></td>
<td colspan=4></td>
<td width=131 height=23 colspan=4 rowspan=1 valign=top align=left>
<input type="submit" name="Btn_Valider" value="Connexion">
</td>
<td colspan=3></td>
</tr>
<tr>
<td height=82></td>
<td colspan=11></td>
</tr>
<tr>
<td height=138></td>
<td width=926 height=138 colspan=11 rowspan=1 valign=top align=left>
<img width=926 height=138 border=0 src="organisation.gif"></td>
</tr>
<tr>
<td height=13></td>
<td colspan=11></td>
</tr>
<tr>
<td height=54></td>
<td width=926 height=54 colspan=11 rowspan=1 valign=top align=left>

<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=3 height=3></td>
<td width=918></td>
<td width=3></td>
</tr>
<tr>
<td height=47></td>
<td width=918 height=47 valign=top align=left>

<p align=center><center><font face="Arial" color=#000000 size=1><B>TÉLÉPHONE&nbsp;: 00 00 00 00 00<br>TÉLÉCOPIE&nbsp;: 00 00 00 00 00<br>MESSAGERIE&nbsp;: [email protected]<br></B></font>
</td>
<td></td>
</tr>
<tr>
<td height=3></td>
<td colspan=2></td>
</tr>
</table>

</td>
</tr>
</table>

<a name=bottom></a>
</form>
</body>
</html>