Bonjour,

C'est allucinant, je me pred le chou pour untruc simple et je n'arrive pas a faire fonctionner.

J'ai une table qui contient plusieurs chapms dont
fd_username et
fd_pw

Dans fd_username, j'ai "toto"
Dans fd_pw, j'ai "titi"

J'ai ensuite ce code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
 
/*
	(isset($_POST['f_pw'])) ? $pw = Security($_POST['f_pw']) : $pw="q";
		(isset($_POST['f_username'])) ? $username = Security($_POST['f_username']) : $username="w";
*/
 
		include("include/db_connect.php");
		$sql ="SELECT fd_username,fd_pw FROM members WHERE fd_username LIKE 'toto' AND fd_pw LIKE 'titi'";
		$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
		$nb = mysql_num_rows($req);
Vous voyez, j'ai directement mis
WHERE fd_username LIKE 'toto' AND fd_pw LIKE 'titi'
$nb me retourne 0

Mais pourqoi, alors que j'ai un enregistrement qui contient toto et titi, dans les champs fd_username et fd_pw?????