trying make simple login page, here's form:
<form action="admin/login" method="post" enctype="multipart/form-data"> <div class="input-container"> <span class="label">username:</span> <input class="login-input" type="text" name="user" required> <span class="label">password:</span> <input class="login-input" type="password" name="pass" required> </div> <input id="login-button" type="submit" value="log in"> </form>
here's login page:
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(e_all); echo $_post['user']; ?>
i printed out:
notice: undefined index: user in /var/www/html/admin/login.php on line 6
i have no idea going on , i've tried everything.
figured out, guys right issue .htaccess file.
i needed add slash after action path:
action="admin/login/"
that's it!
Comments
Post a Comment