CSC220 Lab 4 2010
--D. Thiebaut 13:16, 22 September 2010 (UTC)
Contents
Question 1
- cd to your public_html directory.
- Write a simple html form that uses text input tags to request your name, your graduation year, and your major. Use form1.htm for inspiration. Call your file something such as Lab4Form1.htm.
- Make sure your form1.htm file indicates that echoform.php is the file that will be receiving the form parameters.
- Make sure you chmod the file a+r.
- Create an echoform.php file that you can use to test all your forms: Use the code from echoform.php. chmod it as well.
- Test your form by loading its URL in your browser: http://cs.smith.edu/~220a-xx/Lab4Form1.htm
- Verify that the echoform.php program is called when you submit your data.
Question 2
- Create your own php file that will process the information from your form. Call this new php file processLab4Form1.php, for example, and make it generate a simple output; something like this:
Hello Stephanie, you will graduate in 2012, and you are a CS major.