Reply to Re: Log and Error/Info Message class

Your name:

Reply:


Posted by Dikkie Dik on 12/15/05 21:25

Just one thing. Look at what happens if the user types his email as:
' OR 1=1 LIMIT 1;-- haha@haha.com

I hope you use some addslashes function before passing it to the database.

....
> And my class that handles the queries look like that:
>
> $result = mysql_query("SELECT * FROM cms_users WHERE cms_user_email =
> '".$email."' AND cms_user_passwd = '".$password."'") or die(mysql_error());
> $num_rows = mysql_num_rows($result);
> ...
> if($num_rows == 1)
> return true;
> else
> {
> $log=new log();
> $log->Log('Message','Invalid Login, please make sure you
> enter your Email and Password.<br>If you forgot your
> password, enter your email and hit the forgot password button.');
> }

[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

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