da39a3ee5e6b4b0d3255bfef95601890afd80709
$champ = sha1($_POST['champ']);
$query mysql_query("SELECT champ FROM table WHERE champ_bdd '$champ' AND champ_bdd = '$champ' ") or die('message d'erreur'.mysql_error());
if(mysql_num_rows($query) == 1){ echo "<center>Vous êtes authentifié. Merci...</center>"; } else // Test si l'utilisateur est inscrit - réponse négative echo "<center>Vous n'êtes pas inscrit. Merci de vous inscrire.</center>"; }
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question$grain = 'ce qu'on veut'; $mdp = $_POST['champ']; $sel = 'ce qu'on veut'; $sha1 = sha1($grain.$mdp.$sel);
// define('PREFIXE_SHA1', 'p8%B;Qdf78'); // $mdp = $_POST['champ']; // $mdp_sha1 = sha1(PREFIXE_SHA1.$champ);
$query = mysql_query("SELECT * FROM table WHERE champ_bdd='".$identifiant_connexion."' AND champ_bdd_mdp = '".sha1($_POST['$password_connexion'])."'") or die('Erreur lors de la connexion'.mysql_error());
4228edfb978ba56aa49e800964af3e5e8497540d
Erreur lors de la connexionYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '4062131c67aa967ebe1481fca43abc8832349911')'' at line 1
mysql_query("SELECT * FROM user WHERE user_pseudo='".$identifiant_connexion." AND user_mdp=sha1('".$password_connexion_crypte."')'") or die('Erreur lors de la connexion'.mysql_error());
Erreur lors de la connexionYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '4cf997735475afd79f8711e22efaa9d306294785')'' at line 1
4228edfb978ba56aa49e800964af3e5e8497540d
define('PREFIXE_SHA1', 'p8%B;Qdf78'); $mdp = $_POST['password_connexion']; $mdp_sha1 = sha1(PREFIXE_SHA1.$password_connexion);
Erreur lors de la connexionYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Nom AND user_mdp=da39a3ee5e6b4b0d3255bfef95601890afd80709' at line 1
$query = mysql_query("INSERT INTO user VALUE('', '', '$pseudo','$password_inscription_sha1', '', '','$email','','','','','')")or die('Erreur lors de l\'insertion ! '.mysql_error()); // Envoie une requête à un serveur MySQLqui marche
$password_inscription_sha1 = sha1($password_inscription);
$query = mysql_query("SELECT user_pseudo FROM user WHERE user_pseudo=".$identifiant_connexion." AND user_mdp=".$password_connexion_sha1."") or die('Erreur lors de la connexion'.mysql_error()); // Envoie une requête à un serveur MySQL
$password_connexion_sha1 = mysql_real_escape_string(htmlspecialchars(stripcslashes(sha1($_POST['$password_connexion']))));
da39a3ee5e6b4b0d3255bfef95601890afd80709
Erreur lors de la connexionYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND user_mdp=da39a3ee5e6b4b0d3255bfef95601890afd80709' at line 1
if(mysql_num_rows($query) == 1){ echo "<center>Vous êtes authentifié. Merci...</center>"; // Déposer un cookie pour gérer la checkbox "Se souvenir du profil" if(isset($_POST['se_souvenir_de_moi'])){ setcookie("cookiepseudo", $_POST['identifiant_connexion'], time()+60*60*24*100, "/"); setcookie("cookiepassword", $_POST['password'], time()+60*60*24*100, "/"); } else { setcookie("cookiepseudo","" , NULL, "/"); setcookie("cookiepassword","" , NULL, "/"); } } else { // Test si l'utilisateur est inscrit - réponse négative echo "<center>Vous n'êtes pas inscrit. Merci de vous inscrire.</center>"; } }
Erreur lors de la connexionYou have an error in your SQL syntax;
$query = mysql_query("SELECT user_pseudo FROM user WHERE user_pseudo=".$identifiant_connexion." AND user_mdp=".$password_connexion_sha1."") or die('Erreur lors de la connexion'.mysql_error()); // Envoie une requête à un serveur MySQL
$lSQL="SELECT user_pseudo FROM user WHERE user_pseudo=".$identifiant_connexion." AND user_mdp=".$password_connexion_sha1.""; echo $lSQL; $query = mysql_query(lSQL) or die('Erreur lors de la connexion'.mysql_error()); // Envoie une requête à un serveur MySQL