Web-based System Using HTML, PHP & MySQl | Assignment

Added on - 25 Sep 2019

  • 5


  • 1729


  • 102


  • 0


Trusted by +2 million users,
1000+ happy students everyday
Showing pages 1 to 2 of 5 pages
PHPmain body start Your task for this practical assignment consists of threeparts:1Develop a web-based system using HTML, PHP, and MySQL thatprovides the functionality stated in theRequirements sectionbelow.2Make the system that you have created accessible and usable via theURLhttp://cgi.csc.liv.ac.uk/~<your username>/books.phptaking care that the access rights for thefile are neither too restrictive nor too permissive. Making thesystem usable includes setting up the corresponding database onthe departmental MySQL server and filling it with the appropriatedata.RequirementsA local gym has asked you to develop a web-based system that allowsmembers of the gym to book its fitness classes. To keep the systemsimple, we assume that the gym members do not have accounts with thesystem but instead enter a few personal details whenever they book aclass. They also only book a class one week ahead. Each class istypically offered more than once during a week. Every time a class is runit can only accommodate a certain number of participants, in thefollowing we will call this thecapacityof the class or the number ofplaces on the class. We keep the range and capacity of classes small.In more detail, we assume that the gym offers the following classes atthe indicated times and all with the indicated capacity independent of thetime at which the class is offered:ClassTimesCapacityBootCampMonday, 9:00; Tuesday, 9:00; Wednesday,9:002BoxerciseThursday, 10:00; Friday, 10:004PilatesMonday, 11:00; Wednesday, 11:00; Friday,11:003YogaTuesday, 13:00; Wednesday, 13:002ZumbaFriday, 14:002That is, in total there are 5 different classes, offered between once andthree times a week, and each with a capacity for only two to fourparticipants every time the class runs.
The web-based system should allow a gym member1select a class via a drop-down/pop-up list or selection menu;2select a date and time at which that particular class is offered via aseparatedrop-down/pop-up list or selection menu;3enter their name via a text field;4enter their phone/mobile number via another text field (in case theclass is cancelled at short notice and gym members need to benotified);5after selecting/entering the data above, submit a booking request bypressing a `Submit' button.Ideally, the user of the system is able to enter all this data via a singleweb page (not a sequence of two or more pages). However, a sequenceof web page can be used if this is the only way that you are able torealise this system.Also, ideally, the menus are populated with data from the database.On submission of a booking request, the user should be shown aconfirmation whether the booking request has been successful orunsuccessful.The system should ensure that what the user enters as a namesatisfies the following constraints: A name only consist of letters(a-z and A-Z), hyphens, apostrophes and spaces; contains nosequence of two or more of the characters hyphen andapostrophe; and starts with a letter. If these constraints aresatisfied, then we call the name valid. If these constraints arenotsatisfied, then the system should display an error message and thebooking request must be unsuccessful.The system should ensure that what the user enters as a phone ormobile number satisfies the following constraints: A phone ormobile number only consists of digits and spaces; contains eithernine or ten digits; and starts with the digit 0. If these constraints aresatisfied, then we call the phone number valid. If these constraintsarenotsatisfied, then the system should display an error messageand the booking request must be unsuccessful.If name and phone number are valid, then a booking request must besuccessful if for the selected class at the selected date and timestill has at least one place left. On success, the number of placeson the selected class at the selected date and time is reduced byone and a record will be kept in the database of the booking,including the class, date and time, name and phone number.A booking request must be unsuccessful if there are no places left onthe selected class at the selected date and time.Underlying the system must be a MySQL database. Initially, thedatabase must contain information on the classes, the dates and times
You’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document