Hi .
Am am trying to set up the Mailing List Manager in Luke Welling and Laura Thompson's book 'PHP and MySQL Webdevelopment'.
I cannot get it to access or set up a new account, and have tracked the problem to the login function:
--8<-------
$query = "select `admin` from `subscribers`
where `email`='$email'
and `password` = password('$password')";
//echo $query;
$result = mysql_query($query);
if (!$result){
return $query;
return "no it failed";
return false;
}
if (mysql_num_rows($result)<1)
return false;
if(mysql_result($result, 0, 0) == 1)
return 'admin';
else{
return ("seems normal..");
return 'normal'; }
}
yet when it returns the query (therefore $result has failed), the following query:
select admin
from subscribers
where email
='admin@localhost' and password
= password('admin')
works fine when I paste it into the query box in phpmyadmin..
I cant think whats wrong..
Its a valid query syntax, and indeed, it executes properly..
Anything obvious here, or has anyone had any success with this app. (Pyramid-MLM) at all ?
Thanks in advance, Mike.