Community Supporter?
World Wide Whale
Gender:
Posts: 160
1052 credits Members referred : 1
« on: Jul 31, 2006, 03:46:23 am »
Well i will try to tell you my problem... i have a website that requires registration,so which is the problem... every member makes the registration thats ok...so far, when the member try to login have the error * Password or login incorrect* this happening to my login.php page I upload to the server my back up and nothing happened!!! Could someone give a solution to my problem?
P.S i don't know PHP
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5799
46391 credits Members referred : 3
« Reply #1 on: Jul 31, 2006, 08:10:40 am »
Don't worry, we know php, but you have to post some code to understand what the problem is....
Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #7 on: Jul 31, 2006, 03:19:20 pm »
does this script worked before?
check also in your php configuration the value for register_globals
Community Supporter?
World Wide Whale
Gender:
Posts: 160
1052 credits Members referred : 1
« Reply #8 on: Jul 31, 2006, 03:32:04 pm »
function auth($log,$pass){ global $t_user; $query = "select id from ".$t_user." where email=\"".$log."\" and pass=\"".$pass."\" "; $result = MYSQL_QUERY($query); if(mysql_num_rows($result)>0){ $id=mysql_result($result,0,"id"); @mysql_free_result($result); return $id; }else{ @mysql_free_result($result); return 0;
ok guys I am a big idiot!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I just noticed that for usename you need (where email=\"".$log."\" and pass=\"".$pass."\" " the email not only the name ok I am sorry... Thank you Nikolas and Olaf
Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #9 on: Jul 31, 2006, 03:34:33 pm »
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5799
46391 credits Members referred : 3
« Reply #10 on: Jul 31, 2006, 03:35:36 pm »
Hehe, it's ok.
BTW change this :
$query = "select id from ".$t_user." where email=\"".$log."\" and pass=\"".$pass."\" ";
to this :
$query = "select id from ".$t_user." where email=\"".addslashes($log)."\" and pass=\"".addslashes($pass)."\" LIMIT 1";