You are on page 1of 1

Practice Questions: HTML & PHP

1. Create a simple HTML form and accept the user name and display the name through PHP
echo statement.
2. Write a PHP script to display string, values within a table.
3. Write an HTML file that contains a form and a PHP program that processes the data from
the form. The form should contain some questions that the user can answer, and the PHP
program should produce a response that incorporates the user's answers in some way.
4. Write a PHP Calculator class which will accept two values as arguments, then add them,
subtract them, multiply them together, or divide them on request.
For example :
$mycalc = new MyCalculator( 12, 6);
echo $mycalc- > add(); // Displays 18
echo $mycalc- > multiply(); // Displays 72