RE: [PHP] question about validation and sql injection

2008-05-16 Thread Boyd, Todd M.
p://www.databasejournal.com/features/mysql/article.php/3599166 Todd Boyd Web Programmer > -Original Message- > From: Sudhakar [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 15, 2008 5:26 PM > To: php-general@lists.php.net > Subject: [PHP] question about validation an

Re: [PHP] question about validation and sql injection

2008-05-16 Thread Iv Ray
Hej Sudhakar, what a long e-mail ;) ! I would suggest you use e-mail address as user name. There are many good reasons why to do so, I will give you some, if you wish. Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] question about validation and sql injection

2008-05-15 Thread Chris
Dmitri wrote: > your validation looks good enough to me. If you only allow > alphanumerical chars, then your should not be worried about sql injection > also use addslashes($username) before you insert into database and you > should be fine. > > Usually addslashes is enough to prevent this, but th

Re: [PHP] question about validation and sql injection

2008-05-15 Thread Dmitri
your validation looks good enough to me. If you only allow alphanumerical chars, then your should not be worried about sql injection also use addslashes($username) before you insert into database and you should be fine. Usually addslashes is enough to prevent this, but the validation that you

[PHP] question about validation and sql injection

2008-05-15 Thread Sudhakar
A) validating username in php as part of a registration form a user fills there desired username and this is stored in a mysql. there are certain conditions for the username. a) the username should only begin either letters or numbers, and Underscore character example = user123, 123user, u_ser123