Reply to Re: Loging Script

Your name:

Reply:


Posted by Colin McKinnon on 02/17/07 13:50

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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация