08-02-2009, 22:40 | #11 |
The Stig
Join Date: Jul 2006
Location: Fightertown USA
Posts: 1,458
|
I know it's not the issue you've asked about but from quickly looking at your login code I suggest you go and read about SQL injection. Putting user inputted strings straight into a query without sanitizing them first is just asking for trouble.
|
08-02-2009, 22:53 | #12 |
Screaming Orgasm
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
|
Ooh, good point - well spotted. Leaving SQL un-sanitized is asking for your entire database to be downloaded, tampered with, or just deleted, depending on the mood of the hacker at the time.
|
09-02-2009, 00:17 | #13 |
Absinthe
Join Date: Mar 2007
Posts: 1,070
|
Might want to go down the $db->query route
All about OO then you can amend the connection string in a global class. Plus you can set it up to log execution time and stuff. My 2 cents anyway I've got a feeling I'm about to be flamed for some reason. |
09-02-2009, 09:49 | #14 |
Absinthe
Join Date: Jan 2007
Location: Chester
Posts: 2,345
|
ta.
I'd of liked to do it OO but i've never written OOPHP so just kept it procedural. Too late now to change. deadline is today. :/ |
09-02-2009, 14:55 | #15 |
Nice weak cup of Earl Grey
Join Date: Jan 2009
Location: UK
Posts: 5
|
|
09-02-2009, 16:07 | #16 |
Absinthe
Join Date: Jan 2007
Location: Chester
Posts: 2,345
|
now that is one thing i did have, and always have.
two include files; dbparams and functions_main (connect & db_select) |