IST 210 HTML FORM Assignment P 4 1

  • Slides: 6
Download presentation
IST 210 HTML FORM Assignment P 4 1

IST 210 HTML FORM Assignment P 4 1

IST 210 2 Guideline • Add forms in your web page so that visitors

IST 210 2 Guideline • Add forms in your web page so that visitors can add a comment about your web page • Forms should include the following elements: • A • A • A text field textarea field set of radio button dropdown menu submit button • Write a PHP file to display all data a visitor inputs in a new page after the submit button is clicked • Test the input of radio button and print out different messages

IST 210 Create: https: //my. up. ist. psu. edu/duw 24/comment. php 3

IST 210 Create: https: //my. up. ist. psu. edu/duw 24/comment. php 3

IST 210 Get Started comment. php <html> <form action="process_comment. php" method="post"> Name: <input type

IST 210 Get Started comment. php <html> <form action="process_comment. php" method="post"> Name: <input type = "text" name="username" value = ""/> <input type="submit" value ="go" /> </form> </html> process_comment. php <? php $user. Name=$_POST["username"]; echo "Hello <b>$user. Name</b>! "; ? > 4

IST 210 5 Hints • Create a page comment. php form input • A

IST 210 5 Hints • Create a page comment. php form input • A text field for name • A button for Yes/No • A textarea for comment • Learn this format by yourself • http: //www. w 3 schools. com/tags/tag_textarea. asp • A dropdown list for rating • Create a page process_comment. php to process form • Echo name • Use “IF/ELSE” to echo “like” or “do not like” • Echo comment • Echo rating

IST 210 6 NOTE • This is an extra credit assignment • If you

IST 210 6 NOTE • This is an extra credit assignment • If you missed any of the three programming assignments, this is to help you make it up. Or if you want to get more than 5% of your grade, you can complete this assignment as well.