A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

OI PHPBb3 PEOPLE

1.1k views · started by HTML ·
#1
OI PHPBb3 PEOPLE
AM I DOING THE HASH THING RIGHT? BECAUSE THIS ISN'T WORKING!


<?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!";

}

}




?>
#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.
#3
Artificial wrote:
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.


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 to work out, but finally got it to work by making some minor changes.

In the end though, I decided to use SMF forums, to make shit easier on everyone.