Html and php for creating dynamic web pages

Assignment Help Programming Languages
Reference no: EM13842077

For this lab you will use your knowledge of HTML and CSS in order to introduce you to Javascript and PHP for creating dynamic web pages that interact with a web server. As with the previous lab you are NOT permitted to use Dreamweaver or similar software. You should first read:

• HTML forms: www.w3schools.com/html/html forms.asp

• HTML on change: www.w3schools.com/tags/ev onchange.asp

• HTML required: www.w3schools.com/tags/att input required.asp

• Javascript introduction: www.w3schools.com/js/js intro.asp

• Javascript syntax: www.w3schools.com/js/js syntax.asp

• Javascript functions: www.w3schools.com/js/js functions.asp

• Javascript if tests: www.w3schools.com/js/js if else.asp

• PHP introduction: www.w3schools.com/php/php intro.asp

• PHP syntax: www.w3schools.com/php/php syntax.asp

• PHP variables: www.w3schools.com/php/php variables.asp

• PHP printing: www.w3schools.com/php/php echo print.asp

• PHP if tests: www.w3schools.com/php/php if else.asp

• PHP form handling: www.w3schools.com/php/php forms.asp

• PHP dates: www.w3schools.com/php/php date.asp

 

Before you can view your HTML document through a web browser (e.g., Chrome, Firefox, Explorer), it will need to be uploaded to your www folder on the Purdue server and made publicly available.

These instructions are at www.itap.purdue.edu/learning/careeraccount/webpage.html.

• Click the "instructions found on the GoldAnswers self-help knowledge base" link for step-bystep instructions to create a www folder in your CAREER account. The three links on the bottom of that page provide further instructions in the event you encounter problems viewing your web page from a web browser (e.g., you get a permissions-related error).

What to hand in for this question You will upload (1) a screen shot of your website, and (2) the PreLab4.php file. For the screen shot, the address bar of the browser MUST clearly be visible and show the full address on the ITaP server of your web page

This link will have the following format: https://web.ics.purdue.edu/∼[YOUR LOGIN]/IE332/PreLab4.html

The TA will verify your solution by viewing the web page and associated code.

Instructions In this pre-lab, you will create two files, (1) an HTML file to display a dynamic form to the user, and (2) a PHP file that accepts the form data and processes it for redisplay to the user. These files should both be stored in the same directory, within your www folder in your CAREER account.

1. Copy the source code for "A Simple HTML Form" from the w3schools example and save it as PreLab4.html: www.w3schools.com/php/php forms.asp.

2. Edit the HTML form such that it appears exactly as in Figure 1. The drop down selection box will provide five options: None, Chocolate, Ice cream, Fruit and Creme Brule. The blank area is an Error! Filename not specified.with height 200 and width 300, and the second row of the that controls the form layout spans two columns.

2459_1.png

 

3. To your HTML file, you will add an onchange Javascript function that is similar to the example shown in: www.w3schools.com/tags/ev onchange.asp. Specifically, your modification will cause the <img> source to dynamically change based on the user selection of the drop down box. HINTS:

• Use w3schools "Changing the Value of an Attribute" example as a reference: www.w3schools.com/js/js htmldom html.asp.

• Modify your onchange Javascript function to include an if test that causes the <img> source to change based on the dessert menu item clicked on by the user. See Figure 2 for a screenshot of what this should look like.

• The four dessert images are available from the Lab 4 section of Blackboard.

1504_2.png

Figure 2: The website should change the <img> source as the user selects a new option from the drop down box. This must be done with dynamic Javascript.

4. The fields of your form must require nonempty values when the user clicks submit, otherwise an error similar to that shown in  Figure 3 should appear (this automatic error message will likely not appear if viewing the web page in the Safari browser).

737_3.png

Figure 3: If the user clicks ‘Submit' when either the First Name or Last Name text boxes are empty, they should receive an error.
This MUST be done without using Javascript as indicated in the reading materials on the first page of this lab. 3

5. Create another file, name it PreLab4.php (saved in the same directory as your HTML file), by copying the source code in the welcome.php example: www.w3schools.com/php/php forms.asp.

6. Modify your Prelab4.php file such that it produces output similar to that of Figure 4, where the dessert image will coincide with that selected by the user in the HTML form. The other information from the HTML form will also be required to properly recreate this result.

237_4.png

Figure 4: After clicking the ‘Submit' button the user should be redirected to the PreLab4.php file, where the form data will be used to create a website looking like this example. The image will coincide with that chosen by the user.


Attachment:- New WinRAR archive.rar

Reference no: EM13842077

Questions Cloud

Calculate normal time-calculate standard time : Mary had an average observed time for testing 12 seconds. Her performance is 100% Fatigue factor is 15% Calculate normal Time. Calculate Standard time.
Is the development process always the same : How did the creative thinking process work in the development of this product? Describe what took place in each of the four steps. Is the development process always the same? Why or why not
How traditional occupational-industrial safety inspections : Discuss how traditional occupational and industrial safety inspections and worksite monitoring programs interface with system safety effort
What are the differences between meditation and arbitration : Describe two Incoterms rules of your choice. What is the Incoterms rule that is most importer-friendly? Least importer-friendly? Justify your answer. Which of the Incoterms rules include a requirement of insurance by the exporter? What are the differ..
Html and php for creating dynamic web pages : Html and PHP for creating dynamic web pages
Is the recommendation of the marketing vice president legal : Is the recommendation of the marketing vice president legal? Is it ethical? Why or why not? What is the difference between legal and ethical
Common beliefs about leadership that appear in most cases : What are the common beliefs about leadership that appear in most cases. By scanning the coded origins of leadership beliefs held by majority people from where do most of them originate. How valid are each of these beliefs about leadership? what is th..
Explain eight-stage system development life cycle : the System Development Life Cycle (SDLC) is a development methodology that organizations use for large IT projects. Review Figure 13.11 "An eight-stage system development life cycle (SDLC)"
Elements of a corporate entrepreneurial strategy : What specific elements of a corporate entrepreneurial strategy are apparent within Southwest Airlines? How can a small business owner learn from this and apply the information and outcomes to his or her own company

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd