Ecco il mio problema, ho in un database delle password in md5 dovrei effettuare il login, io ho fatto questo, ma sembra non funzionare.
perchè?
ecc.... and password='md5($pass)'"));
perchè? graziess
Ecco il mio problema, ho in un database delle password in md5 dovrei effettuare il login, io ho fatto questo, ma sembra non funzionare.
perchè?
ecc.... and password='md5($pass)'"));
perchè? graziess
Prova:
controlla bene se devi chiudere con una o due parentesi tonde.Codice PHP:
...AND password = '".md5($pass).'");
Errare humanum est, perseverare ovest
non capisco perchè non funziona
nemmeno cosi...
AND password = '.md5($pass).'"));
pardòn, ho sbagliato l'ordine delle virgolette, qui corretto
altrimenti dovresti postare un po' più di codice.Codice PHP:
...AND password = '".md5($pass)."'));
Errare humanum est, perseverare ovest
ecco tutto il codice, il problema è che prima su questo db andavano password senza md5 ora ho impostato md5 ma non riesco ad effettuare il login
grazieCodice PHP:
<? $need_to_login=no; $title=Login; include("config.php");
$check = mysql_num_rows(mysql_query("select * from j5itusers_entity where username='$user' AND password = '.md5($pass).'"));
if ($check >= 1) {
setcookie("username", "$user");
setcookie("password", "$pass");
}
if ($check <= 0) {
print "Incorrect username/password combination.";
}
else {
$stat = mysql_fetch_array(mysql_query("select * from j5itusers_entity where username='$user' and password = '.md5($pass).'"));
$date = date("d m Y");
$ip = $REMOTE_ADDR;
mysql_query("UPDATE j5itusers_entity SET logins=logins+1 WHERE guid = $stat[guid]");
mysql_query("UPDATE j5itusers_entity SET days_inactive=0 WHERE guid = $stat[guid]");
mysql_query("insert into login_log (ip, account, date) values('$ip','$user','$date')")or die("Could not add to log.");
header ("Location: stats.php");
print "
<center>
Login Successful! Redirecting...
</center>
<META HTTP-EQUIV='Refresh'
CONTENT='1; URL=stats.php?ref=login'>
";
}
include("footer.php"); ?>
aiutatemi grazoe
mysql_query("select * from j5itusers_entity where username='$user' AND password=MD5('".$pass."')");
Hai provato a creare un sito con Jaaxo Cms PHP5? new!
nn funziona :S
esegui direttamente la query sul phpmyadmin. Ti funziona?
Hai provato a creare un sito con Jaaxo Cms PHP5? new!
ma dove può stare il problema ?