Hi, I am having some problems with the simplest farking login page in the world. I'm building it to get the basics right, to be able to actually understand the proccess. Anyway, here's the code.
<?php
$host = "localhost";
$user = "xxxxxxxx";
$pass = "xxxxxxxx";
$db = "infinitk_phpbb1";
$connection = mysql_connect($host, $user, $pass) or die ("Could not connect to database");
// selects the database
mysql_select_db($db) or die("could not select database");
$result = mysql_query("SELECT user_password FROM phpbb_users WHERE username = $_POST[user]");
$md5 = md5($_POST['pass']);
if ($result == ($md5)) {
header('Location: success.php');
}
else
echo "password output: $md5<br>";
echo "username input: $_POST[user]<br>";
echo "username output: $result<br>";
?>
the username and password are cencored (yes, they are correct and that is not the issue)
This script recieves the user and pass information from login.html which is a simple login page with 2 fields. Anyway, the problem I'm having is that I do not get redirected to success.php cause instead of an actual username output I keep getting Resource ID#2
You might have seen this problem before, but since the search-engine on this site seems to be down I have no choice but to start a new thread.
Many thanks for your time, I'm thankful for any help