There are simpler ways to make a login/register form using $_SESSION ...
Printable View
There are simpler ways to make a login/register form using $_SESSION ...
can you try to separate this?
here: if (( $num = mysql_num_rows($result) ) and ($passwort != ""))
allow $num to hold the arguments.
then apply this to an if condition
$num = mysql_num_rows($result);
if ( ( $num ) and ($passwort != "") )
try this:
after this line you add:
$result=mysql_query($sql);
$num=mysql_num_rows($result);
if($num=0) {
} else { et.......
or check your query.
$sql = "SELECT * FROM sys_user WHERE username = '$username' AND passwort = '".md5($passwort)."' OR passwort = PASSWORD($passwort))";
how?
1. after that command put die($sql); okay.
2. when php reach the die command the query string appear on your screen.
3. use your mysql command line or any mysql software copy/paste the result and you will see what will happen.