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

Fill in the blanks in the PHP program test2.php. The HTML page allows an admin u

ID: 3575293 • Letter: F

Question

Fill in the blanks in the PHP program test2.php. The HTML page allows an admin user at the client side to enter his/her passcode. The PHP program checks the passcode, and then the appropriate message, wrong code or correct code, will be displayed on a new web page. What goes in the blank for the second part of code?

<form action= "test2.php" method="post">   

<input type="password" name="code"

    placeholder= "type your admin code">

<input type= "submit">

</form>

<!—more html below -->

<?php  

Echo $____________________

                if ($code=="test")

                                echo "correct code";

                else

                                echo "wrong code";       

?>

Explanation / Answer

The blank in the echo should prompt the user for a passcode. So, the echo statement will be:

"type your admin code". And this echo statement is passed from the html file using the variable placeholder.

So, the echo statement should be filled with the variable placeholder.

<form action= "test2.php" method="post">   

<input type="password" name="code"

    placeholder= "type your admin code">

<input type= "submit">

</form>

<!—more html below -->

<?php  

Echo $placeholder

                if ($code=="test")

                                echo "correct code";

                else

                                echo "wrong code";       

?>

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