I have a database and a login form and want to write a php script that validates the login.
How are the types' data access and used?
For example, how do I access the input entered from the user in these elements.
<p><input type="text" name="login" value="" placeholder="Username or Email"></p>
<p><input type="password" name="password" value="" placeholder="Password"></p>
I want to use the login and password for validation. How can these be passed to a php script?
EDIT: I set the action to
<form method="post" action="loginVerification.php">
and when I enter the fields and submit the values, my OS wants to save the loginVerification.php. When I save it I dont get the echo.
I have this in the php file
<?php
echo $_POST['login'];
echo $_POST['password'];
How do I write the logs to a file in php, or is there a way to do runtime verification for php?
Edit 2:
<div class="container">
<section class="login">
<h1>Login</h1>
<form method="post" action="loginVerification.php">
<p><input type="text" name="login" value="" placeholder="Username or Email"></p>
<p><input type="password" name="password" value="" placeholder="Password"></p>
<p class="remember_me">
<label>
<input type="checkbox" name="remember_me" id="remember_me">
Remember me on this computer
</label>
</p>
<p class="submit"><input type="submit" name="commit" value="Login"></p>
</form>
</section>
<section class="login-help">
<p>Lost password? <a href="index.html">Click here to reset it</a>.</p>
</section>