Search found 5 matches

by itDanny22
Fri Jan 30, 2015 1:09 pm
Forum: PHP - Code
Topic: Help with User Control Panel
Replies: 6
Views: 3504

Re: Help with User Control Panel

I have also tried using,

Code: Select all

$dbpassword = sha1($row['password']);
But I can't get it to work
by itDanny22
Fri Jan 30, 2015 12:09 pm
Forum: PHP - Code
Topic: Help with User Control Panel
Replies: 6
Views: 3504

Re: Help with User Control Panel

You need to save it to a variable. Right now you're discarding it. Instead of $dbpassword = $row['password']; //setting dbpassword as variable from table, change 'password' to your field! hash('sha1', $dbpassword); use $dbpassword = hash('sha1', $row['password']); I have done that, but it still doe...
by itDanny22
Wed Jan 28, 2015 1:54 pm
Forum: PHP - Code
Topic: Help with User Control Panel
Replies: 6
Views: 3504

Re: Help with User Control Panel

I had made a mistake Before it was, $dbusername = $row['username']; Then I changed 'username' to 'user', now it seems to work. In my database, my password was hashed with sha1, I had removed the sha1 just for my account and replaced the password with 'bob' without hashing it. Then I had logged into ...
by itDanny22
Wed Jan 28, 2015 1:45 pm
Forum: PHP - Code
Topic: Help with User Control Panel
Replies: 6
Views: 3504

Re: Help with User Control Panel

Do you do a session_start() before doing $_SESSION['username'] = $dbusername; ? Yep, it's right at the top, <?php include("config.php"); // including our config.php where is connecting to mysql... session_start(); //starting session for profile.php (Dunno how to explain better) look littl...
by itDanny22
Wed Jan 28, 2015 1:22 pm
Forum: PHP - Code
Topic: Help with User Control Panel
Replies: 6
Views: 3504

Help with User Control Panel

Hey, I'm not very good when it comes to PHP. However I'm scripting a game using the PAWN language. I use MySQL to save the players data and sha1 to save the players password. I have a UCP, and when I try to login with the correct user and pass, it doesn't log me in, it says Wrong username or passwor...