Open phpformentry.html and phpformprocess.php from beginnerssite and save them in intermediatesite.

Currently the PHP in phpformprocess.php should look something like this:

$firstvalue=$_POST["text1"];
$secondvalue=$_POST["text2"];
if ($firstvalue=="fred") {
    if ($secondvalue=="secret") {
        echo "<p>Logged in</p>";
    } else {
        echo "<p>Haxxor</p>";
    }                
} else {
    echo "<p>Haxxor</p>";
}

This structure does exactly the same but in a neater way so put it in to replace the existing code:

$firstvalue=$_POST["text1"];
$secondvalue=$_POST["text2"];
if ($firstvalue=="fred"  && $secondvalue=="secret") {
    echo "<p>Logged in</p>";				
} else {
    echo "<p>Haxxor</p>";
}

Try it with the correct user name and password.  The && means that both conditions must be true (AND).  Try it with one value correct and the other wrong.

Change the && to || and try again with one value correct and the other wrong.  This time you should get through as || means that either one or the other can be true (OR).

More

You can have as many conditions as you want.

You can also combine && and || but that becomes potentially disastrous so be careful.  Consider this:

$firstvalue=="fred"  && $secondvalue=="secret" || $secondvalue=="other"

You might think that will allow a person to have more than one password.  Replace your condition with it and try a wrong username and the password other.  The person can now log in using the correct log in (fred and secret) OR any user name and the password other.  The correct structure would be this:

if (($firstvalue=="fred"  && $secondvalue=="secret") || ($firstvalue=="sara" $secondvalue=="other"))

Now two users can log in but they each have to get the user name and password pair both correct.  Putting in the extra brackets makes what you intend clear to the server.  In English it might sound like this:

if the username is fred and the password is secret or the username is sara and the password is other