Hello,
i did not see where you start session?
Try to write your code, not to show warning messages. You can use empty (http://www.php.net/empty) to check if a variable is empty.
If you have the ability to use POST, do not use GET to pass that login (you can make your program safer.) Make this login variable in a hidden element with your form.
Just a suggestion:
if(!empty($_POST["login"]))
{
extract($_POST);
/* then you can use $username now, this variable has made with extract function. */
}
Check the username and password before you select them from a database table.
If you directly use the variables from the form (in a database sql query), ist not soo safe, lets use
mysql_real_escape_string() to keep your database safe from mysql injection.
And for security reasons lets store the passwords using an encryption.
For example: md5() http://us.php.net/manual/en/function.md5.php
Hello,
jjozsi