AM I DOING THE HASH THING RIGHT? BECAUSE THIS ISN'T WORKING!
Code:<?php if ( isset($_POST['username'])) { include 'Login.php'; sessionstart(); $username = mysql_real_escape_string($_POST['username']); $password = mysql_real_escape_string($_POST['password']); $password = phpbb_hash($password); $result = mysql_query("SELECT * FROM php_users WHERE username ='".$username. "' AND user_password ='".$password. "' LIMIT 1"); $count=mysql_num_rows($result); if($count==1) { echo "You have sucessfully logged in {$username} "; echo '<br />'; header( 'Location: http://www.cytonia.com/index.php' ) ; } else { echo "Invalid username or password!"; } } ?>
Results 1 to 3 of 3
Thread: OI PHPBb3 PEOPLE
- 27 Jun. 2010 03:02am #1
OI PHPBb3 PEOPLE
Last edited by HTML; 27 Jun. 2010 at 07:04pm.
- 28 Jun. 2010 10:23pm #2
Unless a custom phpbb3 function, sessionstart() =/= session_start()
Output the query and then run it in the database to see what's going on. Could be the hash is wrong.
- 28 Jun. 2010 10:47pm #3
Yeah man, it was the hash, I forgot to add the salt to the hash, also I had to include the functions.php to use the hash. Not only that, the functions.php ended the script. xD it was allloooot t
rk out, but finally got it t
rk by making some minor changes.
In the end though, I decided to use SMF forums, to make shit easier on everyone.Last edited by HTML; 28 Jun. 2010 at 10:50pm.