Tom's Guide > Forum > Programmation > * titre à éditer *
Mot :    Pseudo :           
 

bonjour a tous

voila mon problem j'ai un script et quand je l'essaye pour me connecter sa me mais sa Unknown column '...' in 'where clause' pouvez vous m'aider
voila mon script

Citation :

<?php require_once('Connections/haoxi.php'); ?>
<?php
if (!function_exists("GetSQLValueString" )) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "" )
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string" ) ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "" ) ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "" ) ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "" ) ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "" ) ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "" ) ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}

$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}

if (isset($_POST['pseudo'])) {
$loginUsername=$_POST['pseudo'];
$password=$_POST['mdp'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "/inscription.php";
$MM_redirectLoginFailed = "/Connection.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_haoxi, $haoxi);

$LoginRS__query=sprintf("SELECT pseudo, `mot de passe` FROM membres WHERE pseudo=%s AND `mot de passe`=%s",
GetSQLValueString($loginUsername, "text" ), GetSQLValueString($password, "-1" ));

$LoginRS = mysql_query($LoginRS__query, $haoxi) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";

//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;

if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans titre</title>
</head>

<body>
<p>&nbsp;</p>
<form id="form1" name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
pseudo
<label>
<input type="text" name="pseudo" id="pseudo" />
</label>
<p>mot de passe
<label>
<input type="password" name="mdp" id="mdp" />
</label>
</p>
<p>
<label>
<input type="submit" name="envoyer" id="envoyer" value="Envoyer" />
</label>
</p>
</form>
<p>
<label> </label>
</p>
<p>&nbsp;</p>
</body>
</html>


merci d'avence


Message édité par SiM07 le 07-02-2009 à 16:18:59
Liens sponsorisés
Inscrivez-vous ou connectez-vous pour masquer ceci.

Le titre de ce sujet a été édité par SiM07

 


[!] Modération : Merci d'éditer ton titre (bouton http://img.infos-du-net.com/forum/themes_static/images_forum/3/edit.gif de ton premier post), pour en mettre un plus explicite, conformément aux règles.


Message édité par SiM07 le 07-02-2009 à 16:19:40
------------------------------ 20minutes.fr, l'information en continu.
Répondre à SiM07
Tom's Guide > Forum > Programmation > * titre à éditer *
Aller à :

Il y a 2396 utilisateurs connus et inconnus. Pour voir la liste des connectés connus, cliquez ici.

Attention

Vous allez répondre sur un sujet resté inactif pendant plus de 6 mois.
Assurez-vous d'apporter des éléments nouveaux à la discussion avant de poursuivre.

Répondre Annuler
Liens