Code is incredibly insecure...
That isn't a hacking attempt. A hacking attempt is where a query sent to the database would look like:PHP Code:if($username == "+"){
echo("Hacking attempt.");
exit();
}
SELECT * FROM users WHERE username='admin' AND password='' OR 1=1
As 1=1 is always going to return as true, it'll think the user is logged in.
When you declare your username and password variables, use this:
It'll filter out nasty queries like the one above.PHP Code:$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
Also, how are you encrypting your passwords when you store them in the database. From the login script, it looks like they're stored as plaintext, which is incredibly insecure. You should be storing them hashed with either md5 or sha1 (hopefully, with salts as well).






Sorry sorry.


