Here's what the relevant lines in this script do:

  • $GoodPassword = 'acme';

    Assigns the value "acme" to the variable $GoodPassword.

  • if ($password == $GoodPassword){

    Compares the password word typed in the text box on if.html to the password assigned to the variable $GoodPassword.

    If they’re the same, then the code between the curly braces is executed:

    print "<b>Acme Password verified!</b><br>\n";

    TIP: The double equal sign == is used to compare variables. A single equal sign assigns a value to a variable.

  1. Open phplinks.html and insert a new link to if.html:

    <p><a href="http://www.yourwebsite.com/if.html">15. Enter a password.</a></p>
  2. Save phplinks.html, then upload it to the home directory in your Web site.