PHP Programing language

Forms Handling in PHP
adplus-dvertising
Previous Home Next

Forms Handling in PHP

The PHP super global variables $_GET, $_POST and $_REQUEST are used to collect form-data.

Example:

Index.php:

<html> 
<body>

<form action="abc.php" method="post">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
</form>

</body>
</html>

abc.php:

<html>
<body>
Welcome 

<?php 
echo $_POST["name"];
 ?>
<br>
Your email address is: 
<?php 
echo $_POST["email"]; 
?>

</body>
</html>

Outgput:

Before Submit Information:

After Submit Information:

ALSO VIEW:
Previous Home Next