How to get and display html input form value on same page using php

How to send and receive html TextView value on same screen with use of php isset submit button method.

In this tutorial we are sending and receiving html form value on same page using if (isset($_POST[‘submit’])) button method. This method helps us to get html input form value on same page after user click on from submit button. So here is the complete step by step tutorial for How to get and display html input form value on same page using php.

android-project-download-code-button

How to get and display html input form value on same page using php.

Code for get-display-on-same-page file.

 
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>How to get and display html input form value on same page using php</title>
</head>

<body>

<table>
<form action="" method="post">
<tr>
<td> Name: </td><td><input type="text" name="name"></td>
</tr>
<tr>
<td> E-mail: </td><td><input type="text" name="email"></td>
</tr>
<tr>
<td><input name="submit" type="submit" /></td></tr>

</form>
</table>

<?php
 if (isset($_POST['submit'])) {
 $NAME = $_POST["name"];
 $EMAIL = $_POST["email"];
 
 echo "Name is = ". $NAME .'</br>';
 echo "Email is = ". $EMAIL .'</br>';
 
 }
 ?>

</body>
</html>

Screenshot :

How to get and display html input form value on same page using php

Click here to download How to get and display html input form value on same page using php project file with source code.