IF Assignment

Problem #1: Write a set of programs (one HTML and one PHP). On the HTML page, take in the variables you will need and pass the data to the PHP program. On the PHP page write the IF code to handle variable1 having to be true and in addition, either variable2 being true or both variable3 and variable4 being true). You should write this as a series of simple if statements. Display the results of the if. Include a literal identifying what you are displaying. I want you to use a print statement and I want you to display the information three times using three different print structures.

Problem #2: Redo the first problem using a compound statement. Display the results of the if. Include a literal identifying what you are displaying. I want you to use a echo statement and I want you to display the information three times using three different echo structures.

Problem #3: Write a PHP program that defines the variables and values that you want to test with. Write the IF code to check for variable1 and variable2 OR variable3 and variable4. Put out the result from the if and a literal. Use two other examples of print and two other examples of echo to show the output.