Answer:
This is the code
Explanation:
<html>
<form method="POST" action="welcome.php">
label for="usname">username:</label><br>
<input type="text" id="usname" name="usname"><br>
<label for="movietitles">Movietitles</label><br>
<textarea type="text" id="movetitle" name="movietitles">Please enter movie titles</textarea>
<input type="submit">
</form>
</html>
<?php
$Movietitles= array("bland", "decoy","Mademan", "Rich", "bland", "decoy","Mademan", "Rich", "bland", "decoy","Mademan", "Rich" , "bland", "decoy","Mademan", "Rich, "decoy","Mademan", "Rich", "Adapt" );
$username= $_POST['username'];
if (!empty($_POST['username'])) {
$username = $_POST['username'];
echo "Welcome";
}
?>
The post method HTTP request is used to send the data from the form to the Welcome.php file above so that it validates/tests that username has been entered using the php if statement and if it is not empty(entered username) php "echos" welcome to the screen.