I have a gateway that checks userdetails then prints the users' points.
The password in md5 encrpted in the database.
The code only works at the moment when I allow it to print the users' points based on their username. The login form is basically two fields that post to this gateway.
The script is:
<?php
/* Connecting, selecting database */
$link = mysql_connect("localhost", "zingbats", "my pwl")
or die("Could not connect");
mysql_select_db("tycooneden_com") or die("Could not select database");
$query = "SELECT * FROM phpbb_users WHERE username = '$username' AND user_password = 'md5($password)'";
$result = mysql_query($query) or die("Query failed");
$foo=mysql_fetch_array($result);
/* Start the userdetail defining */
$username=$foo['username'];
$user_password=$foo['user_password'];
$user_points=$foo['user_points'];
mysql_close($link);
?>
You have <?php echo ("$user_points");?> points
It prints "You have points"