20. PHP Program to Read given Address and Display it.
How does this program work?
- This program is used to print the scanned address given by user using PHP.
- In this program we can learn about how to use textarea tags and how to apply style easily in PHP.
Here is the code
<html>
<head>
<title>PHP Program To read the user address and display it</title>
</head>
<body>
<form method="post">
<table border="0">
<tr>
<td> <textarea name="address" style= "width:200px;" placeholder="Enter Your address"></textarea>
</td>
</tr>
<tr>
<td> <input type="submit" name="submit" value="Submit"/>
</td>
</tr>
</table>
</form>
<?php
if(isset($_POST['submit']))
{
$add = $_POST['address'];
echo " Your address: ";
echo $add;
return 0;
}
?>
</body>
</html>