Re: Loging Script
- From: Colin McKinnon <colin.thisisnotmysurname@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 17 Feb 2007 13:50:17 GMT
phyburn wrote:
It seems there is something wrong with my script for the reason that
it always returns, UserName NOT found . I know it connects to the db
fine because I don't get a error. So just been trying to figure out
what's wrong. I am using PEAR btw.
By the time it got to me this had some very unusual formatting - I'd
recommend sticking to the PEAR style guidelines, particularly when posting
to newsgroups.
if(array_key_exists("$user", $rows)){
print "<p><b>UserName AcceptED</b>";
You should be looking for a value, not a key - and getAll returns a nested
array - i.e. somewhere there should be...
$rows[$row_number]['username']==$user
But really you should be checking this in the SQL - not loading a list of
all users then checking in PHP.
C.
.
- References:
- Loging Script
- From: phyburn
- Loging Script
- Prev by Date: Defered interpolation
- Next by Date: php4 end of life
- Previous by thread: Loging Script
- Next by thread: Re: Loging Script
- Index(es):