PHP Learning : FormHandling - Publik Talk

Breaking

An informative website for every one.

Post Top Ad

Post Top Ad

Wednesday, August 2, 2017

PHP Learning : FormHandling

Description:

The example below displays a simple HTML form with two input fields and a submit button..

Code:

<form action="handling.php" method="post">
name: <input type="text" name="fname"><br><br>
age:  <input type="text" name="age"><br><br>
<input type ="submit">
</form>



Output:




Descrition:

When the user fills out the form above and clicks the submit button, the form data is sent for processing to a PHP file named "handling.php".
The form data is sent with the HTTP POST method.

Code:

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


Output:




No comments:

Post a Comment

Post Top Ad