How to print the value in same page using php template

you should set the form action to custom_template.php with this change, when the form is submitted, it will post the data back to the same page custom_template.php, and your PHP script will process the form data and display the entered name on the same page.

<table> 
<form action="custom_template.php" method="POST"> <!-- Ensure form action is set to the same page -->
<tr> 
<td> Name: </td><td><input type="text" name="name"></td> 
</tr> 
<tr> 
<td><input value="Submit" type="submit" /></td></tr> 
</form> 
</table> 

<?php 
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $name = $_POST["name"]; 
    echo "<p>Name: $name</p>"; // Displaying the entered name
}
?>

techhipbettruvabetnorabahisbahis forumutaraftarium24eduedueduseduedusedueduedueduedus