wat zit hier fout?
Dit is ad_login.php
en ad_logentry.php
de fout melding:
Notice: Undefined variable: test_username in C:\Inetpub\wwwroot\aplusprofessional\ad_logentry.php on line 6
Notice: Undefined variable: test_password in C:\Inetpub\wwwroot\aplusprofessional\ad_logentry.php on line 6
Dit is ad_login.php
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| <?
/////LOGIN/////
echo "<div id=\"Layer3\" style=\" position: absolute; z-index: 2; top: 129px; left: 154px; width: 684px; height: 678px; visibility: visible\">";
echo "<div align=\"right\"></div>";
echo "<br><br><br><br>";
echo "<form method=post action=\"index.php?act=ad_logentry\" target=\"_self\" name=\"\">";
echo "<div align=\"center\">";
echo "<p><font size=\"2\"><br>";
echo "<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\"><b>Alleen gemachtigde personen hebben hier acces!</b><br>";
echo "<br>";
echo "Name:</font></font><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">";
echo "<input type=\"text\" name=\"test_username\" size=\"12\" maxlength=\"14\">";
echo "Password:</font> <font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\">";
echo "<input type=\"password\" name=\"test_password\" size=\"12\" maxlength=\"14\">";
echo "</font>";
echo "<input type=\"submit\" value=\"Login!\" name=\"submit2222\">";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "</p>";
echo "</div>";
echo "</form>";
echo "</div>";
?> |
en ad_logentry.php
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| <?
/////LOGIN/////
echo "<div id=\"Layer3\" style=\" position: absolute; z-index: 2; top: 129px; left: 154px; width: 684px; height: 678px; visibility: visible\">";
echo "<div align=\"right\"></div>";
$result = mysql_query("select * from users WHERE user_id = 'administrator' AND username = '$test_username' AND password = '$test_password' ") or
die (mysql_error());
if ( mysql_num_rows ( $result) )
{
echo "Press <b><a href=\"admin/index.php\" class=\"text\"></font>here<font color=\"#333333\"></a></b> to continu :)";
}
else
{
echo "No user found, no login";
}
echo "</div>";
?> |
de fout melding:
Notice: Undefined variable: test_username in C:\Inetpub\wwwroot\aplusprofessional\ad_logentry.php on line 6
Notice: Undefined variable: test_password in C:\Inetpub\wwwroot\aplusprofessional\ad_logentry.php on line 6