$LoginRS__query=sprintf("SELECT username, password, status FROM waumember WHERE username=%s AND password=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $Melody) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
$LoginRS__query=sprintf("SELECT username, password, status FROM waumember WHERE username=%s AND password=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString(md5($password), "text"));