Re: [PHP-DB] Re: Beginners Problem

2008-01-22 Thread Rene Brehmer
Andy, Thanks for your comment. What I posted is only part of my code though, as the entire thing is a bit long, and with all the includes rather hard to follow unless I posted the whole file set. Above the piece I posted I have code to do slashing, and some MD5 hashing, as well enforcing strin

Re: [PHP-DB] Re: Beginners Problem

2008-01-12 Thread sublimino
Could I recommend a more secure approach: 1) using two hashes to protect the data (in case the database is compromised they are both one-way hashes, and using two protects against collision attacks whereby a different password string generates the same hash as the original password) 2) escaping use

Re: [PHP-DB] Re: Beginners Problem

2008-01-11 Thread Rene Brehmer
Peter Westergaard wrote: You should probably check out http://php.net/mysql_query for more information on this function. The difference between "empty result" and "invalid query" is significant. Once you've determined that the query is valid, you must also then check to see if it returned

RE: [PHP-DB] Re: Beginners Problem

2008-01-08 Thread Gary Wardell
the code is wrong but didn't know why, which is why I didn't respond earlier. Gary > -Original Message- > From: Peter Westergaard [mailto:[EMAIL PROTECTED] Behalf Of > Peter Westergaard > Sent: Tue, January 08, 2008 11:09 AM > To: php-db@lists.php.net > Subject:

[PHP-DB] Re: Beginners Problem

2008-01-08 Thread Peter Westergaard
Ben, I would say that the only reason $select_sql_two = mysql_query($select_sql); if($select_sql_two) { would refuse to execute is if $select_sql represents an invalid SQL statement. Whether it has records or not, you should (if I'm not very much mistaken) get a resource returned in sele