i have a membership system I made from a tutorial, can register users no problem, can view list of users in mysql admin, but cannot login in users, now i registered myself using my login name and pw that I use to login to phpmyadmin, that works fine. I have included my script maybe someone can look at where I made the mistake, thx
<?php require_once('Connections/fradmin.php'); ?>
<?php
if (isset($_POST['pwd'])) { $_POST['pwd'] = sha1($_POST['pwd']); }
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$LoginRS__query=sprintf("SELECT username, pwd FROM users WHERE username=%s AND pwd=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $fradmin) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
Bookmarks