Create a web page that allow students to use external files, PHP Web Programming

The purpose of this exericse is to allow students to practice using external files in support of web applications. For this exercise, imagine that the Batty League Flea Market accepts orders over the Internet. The web site will receive the order, then will display a confirmation web page. (NOTE: The site should probably do some other things, like notify the operator of the flea market and send a confirmation email to the buyer. For this assignment, though, you will concentrate on the web confirmation.)

  • Create an ordinary text file named [lastname]-week-7-lab.txt. In that file enter text, including HTML tags, which will display information about the purchase.
  • NOTE: This text will eventually be inserted into the XHTML portion of your PHP script, so include HTML tags to format the text in an appropriate way. However, do not include the header tags - treat the text in this document as the body of the page, rather than the entire thing.
  • NOTE: Give some substance to your web page: "Congratulations! You have purchased . . . thank you for helping . . .". Use your imagination and write a decent web page.
  • Within the web page, use the special text string [ITEM] to mark the place where the string identifying the item should be included. Use the special string [PRICE] to mark the location where the price of the item should be placed.
  • Create an input form named [lastname]-week-7-lab.html which will ask the visitor to enter the inventory ID number of the item which is being purchased, and the price which is to be paid.
  • NOTE: Naturally you would not usually allow the visitor to enter the price - eventually, you would build up this application so that it read that information from the database.
  • Within the script [lastname]-week-7-lab.php, add instructions which will open the text file you have created for the web page and read its contents into a variable named $pageBody.
  • Use the str_replace() function to replace the special strings [ITEM] and [PRICE] with appropriate pieces of information.
  • Display the resulting web page.
Posted Date: 4/2/2013 3:29:13 AM | Location : United States







Related Discussions:- Create a web page that allow students to use external files, Assignment Help, Ask Question on Create a web page that allow students to use external files, Get Answer, Expert's Help, Create a web page that allow students to use external files Discussions

Write discussion on Create a web page that allow students to use external files
Your posts are moderated
Related Questions
Call-back Function for WP Web Scraper - Wordpress Summary- A call-back function for WP Web Scraper to create wordpress post (custom post type) as well as populate custom taxo

How can we increase the execution time of a php script? By the use of void set_time_limit(int seconds) Set number of seconds a script is allowed to run. If this is reached,

Google apps engine Content summary function enhancement Project Scope- a) Develop in Google App Engine (GAE) b) Develop with python c) Comply our system design d) Us

I have a three stage project related to preparing a website: 1) Scraping data from few websites. I will identify which ones and which data once your selected. 2) Modifying th

RETS MLS Python Solution I want a Python, Django proficient to take this solution and make sure that I have the most up to date RETS datafeed. a) Set up capability to configu

We need help in Reputation on Google Need SEO We have a bad criticism on the ripoffreport.com on google page 1 position 2. We want to have it pushed back to page three or more.

Need help in Website plateform exchange Here is a brief introduction to the kind of website/plateform I will need. Expert that companies accounts with employees account withi

Need help for Website update and enhancement using PHP and Mysql We're seeking for a long-term relationship with a web programmer/designer who is able to handle 5 to 10 hours of

We are looking for Local programmer for programming work in a start-up In search of a highly skilled programmer in html, css, sql etc to work apart of a Perth startup. If you ar

Serbian PHP Developer wanted > Must be creative with UI Experience, etc We are interested for a RESPONSIBLE as well as well-organized programmer with the following requirements