Using POST and php get a name form one page to another?

PHP $_POST Function

The predefined $_POST variable is used to collect values from a form sent with method=”post”.

Example

Use Below code input.php


<form action="output.php" method="post">
Name: <input type="text" name="txtname" id="txtname">
<input type="submit">
</form>

 

Use Below code in Output.php


Welcome <?php echo $_POST["fname"]; ?>!<br>
You are <?php echo $_POST["age"]; ?> years old.

 

Using POST and php get a name form one page to another?https://i0.wp.com/plexusworld.com/wp-content/uploads/php.png?fit=289%2C190https://i0.wp.com/plexusworld.com/wp-content/uploads/php.png?resize=150%2C150 angelsujimeena Computers & Internet,,,,,,,,,,,,,,
PHP $_POST Function The predefined $_POST variable is used to collect values from a form sent with method='post'. Example Use Below code input.php <form action='output.php' method='post'> Name: <input type='text' name='txtname' id='txtname'> <input type='submit'> </form>   Use Below code in Output.php Welcome <?php echo $_POST; ?>!<br> You are <?php echo $_POST; ?> years old.  
<h1>PHP $_POST Function</h1> The predefined $_POST variable is used to collect values from a form sent with method="post". Example Use Below code input.php <pre><code> <form action="output.php" method="post"> Name: <input type="text" name="txtname" id="txtname"> <input type="submit"> </form> </code></pre>   Use Below code in Output.php <pre><code> Welcome <?php echo $_POST["fname"]; ?>!<br> You are <?php echo $_POST["age"]; ?> years old. </code></pre>  

This site uses Akismet to reduce spam. Learn how your comment data is processed.