|
||||||
| PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
| Sponsored Links |
|
|
|
|||||
|
Check if the user is logged in correctly, then then create a SESSION variable only if the login is successful.
PHP Code:
![]()
__________________
Emo Philips - "My computer beat me at checkers, but I sure beat it at kickboxing." |
|
|||||
|
Thanx, but I have another problem now. I have used MD5 on the password table, and now I can't log in using my password. How can I fix this one?, here is my login form:
PHP Code:
Code:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/omeragic/public_html/rebus/index.php:8) in /home/omeragic/public_html/rebus/index.php on line 9 |
|
|||||
|
PASSWORD( ) does not generate an md5 hash. You can either use the SQL MD5() or php's built in md5(). You should also know, your code is extremely easy to hack.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||||
|
Quote:
I'm sure there are other problems, but I didn't look all that hard ![]() |
|
|||||
|
The easiest way to protect yourself from an sql injection is with mysql_real_escape_string($username).
John wrote a great security tutorial on other tips / tricks at: PHP Sql Injections Last edited by morefood2001; 08-18-2008 at 11:34 AM. Reason: wrong link |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |
Goal: 100,000 Posts
Complete: 97%