PHP 8 - Form

Last modified: April 02, 2022

Login Page

The below form example will post the information (username and password) to login.php PHP page.

<html> <body> <form action="login.php" method="post"> Username: <input type="text" name="username"><br> Password: <input type="text" name="password"><br> <input type="submit"> </form> </body> </html>

sql

<html> <body> Hello <?php echo $_POST["username"]; ?> </body> </html>