Well, I have the rest done so I don't need to worry about more work, just the little snippet
I was originally using the PEAR:: DB classes but since my host doesn't support it and I'm not only making this for myself, I want to convert it to plain MySQL. This is the only part I've had trouble in.
Originally I had this and it worked fine:
PHP Code:
$check = $db_object->query("SELECT username, password, level FROM users WHERE username = '".$_POST['uname']."'");
if (DB::isError($check) || $check->numRows() == 0) {
die('That username does not exist in our database.');
}
$info = $check->fetchRow();
$_POST['passwd'] = stripslashes($_POST['passwd']);
$info['password'] = stripslashes($info['password']);
$_POST['passwd'] = md5($_POST['passwd']);
if ($_POST['passwd'] != $info['password']) {
die('Incorrect password, please try again.');
}
But since I no longer can use the PEAR:: DB classes I can't use that anymore.
If I can get this one part to work, the rest is fine and easy to convert.