Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m having a problem combining the html and php file into a single .php file. I

ID: 3541682 • Letter: I

Question

I'm having a problem combining the html and php file into a single .php file. I want to be able to do the rest of the project by myself but I can't really do any of it without doing this step.


Here are my codes:


HTML:

<html>

</body>

<h1> My MadLib Lab </h1>

<form action="madlib.php" method="REQUEST">

Enter a Noun: <input type="text" name="noun1" ><br />

Enter an Adjective: <input type="text" name="adj1" ><br />

Enter a Verb: <input type="text" name="verb1" ><br />


<input type="submit" value="Click to see your MadLib" >

</form>

</body>

</html>



PHP:

<html>


<body>

<?php

$noun1 = $_REQUEST['noun1'];

$verb1 = $_REQUEST['verb1'];

$adj1 = $_REQUEST['adj1'];



echo "<h1>The $adj1 $noun1</h1>";


echo "<br>The $adj1 $noun1 decided to $verb1 all the way across the world.</br>";

echo "<br>The end.</br>";


?>


</html>

</body>

Explanation / Answer

Link to merged file

https://www.dropbox.com/s/h0wp8snagmo7bp7/madlib.php

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote