For the sake of learning no-framework php from scratch, I wrote an admin.php file which have the following code:
<?php
$not_auth_msg = "<h1>Not Authorized</h1>";
if($_GET['username'] == "admin") {
$pass = md5($_GET['password']);
if($pass != "21232f297a57a5a743894a0e4a801fc3") {
exit($not_auth_msg);
}
} else {
exit($not_auth_msg);
}
?>
<!doctype html>
<html>
<head>
<!-- link to bootstrap -->
<!-- jquery script -->
<!-- etc -->
</head>
..
..
..
</html>
Authorization works OK, but php 5.4's built in server replies "PHP Notice: Undefined index: username in ..." for each static file (bootstrap, jquery etc.), and the worse thing - the static files do not load!
What am I doing wrong?