how to create and submit simple php form

0
3385

Overview

create php form then submit simple php form
as get and post method
-for demonstration we will learn how to make login form
and submit this login form to next php page
next tutorial we will learn how to insert from data into MYSQL database

index.php

<form name="loginform" action="login_nextpage.php" method="get">
<input type="text" name="username" placeholder="enter username" value="" required>
<input type="password" id="passwordID" name="password" placeholder="enter password" 
value="" required>
<input type="submit" value="Login">
</form>

login_nextpage.php

<?php

echo $_GET["username"]."<br>";
echo $_GET["password"]."<br>";

?>

Summary

how to create php simple form then submit php form as get and post method and how to make login form and submit this login form to next php page.