Program pgm3c_5Web CGS 4854 - Website Construction and Management Professor: Michael Robinson e-mail : michael.robinson@cs.fiu.edu Worth 6 Points - Make sure your program is properly documented and aligned uniformally, looking professionally I will take points off if it is not. - Include the following header in every web page, pgm3.php and Controller3.php: Purpose of this program: ------------------------------ - Create this assignment using an editor only, NO TEMPLATES OR IDES ALLOWED. - Extend your current website creating the new pages, described below, using html, css3, php and mySql - Using tools shown ***** IN CLASS ONLY *****. - In this program we will extend your mainMenu.php dropdown menu, See examples at: http://users.cis.fiu.edu/~mrobi002/teaching/cgs4854/CSS/cssDropdownMenu.html Choose whatever colors, fonts and sizes you want, Program 3: ---------- - Add a NEW link called program 3 to your CSS mainMenu.php, to display the following: program 1 program 2 program 3 home !!!*** NOTE: Your first field on the front-end MUST BE YOUR PRIMARY KEY ***!!! When you press link "program 3" this link will load a new page named program3.html displaying the following front end, in the following order: Your Company/Project Name program 1 program 2 program 3 home Primary Key ___________________ Dropdowns ___________________^ Last Name ___________________ First Name ___________________ Major [] IT [] CS [] Robotics [] Business Email ___________________ Telephone ___________________ Coffee o American o Cuban o Colombian o Dark Comments ------------------- | | | | ------------------- $message Find Modify Save Delete Clear program 1 program 2 program 3 home - MAKE SURE THAT YOUR FRONT END IS TOTALLY ALIGNED AS SHOWN ABOVE. - MAKE SURE TO HAVE THE SHOWN LINE SPACES ABOVE - On the title section display your last name, first name, Program 3 - When you press any of the first five(5) buttons (Find Modify Save Delete Clear), call a new page named Controller3.php, implementing each of the buttons as follows: - Create the following programs, inside the includes folder, called by Controller3 as shown in the videos: - find.php - save.php - modify.php - delete.php - clear.php The above programs will implement the following functions: FIND ---- To find a record in your cuatomer mysql table, enter the primary key on program3.php and press the FIND button, program3.php will pass the primary key value, using POST, to find.php, using your controller3.php program. If the record is found in the customers table, display all the corresponding fields found, on the front-end of your program3.php, and on the $message, using blue color, display "RECORD yourPrimaryKey FOUND". LEAVING all the data on the screen else on your $message using red color, display "RECORD yourPrimaryKey NOT FOUND". LEAVING all the data on the screen. SAVE ---- To save a record in your mysql table, enter the primary key on program3.php and all the necessary information for that new record, and then press the SAVE button, Using controller3.php, pass all the data entered on program3.php front-end, using POST, to save.php, using your controller3.php program. If the record is not FOUND in the table, save.php will add the new record into the customer table, containing all the data entered in program3.php, displaying on the $message "Record yourPrimaryKey Added" using blue color. LEAVING all the data on the front-end else if the record already exist in the table, DO NOT ACCEPT THE DATA, and on on the $message display "RECORD yourPrimaryKey ALREADY EXISTS" using RED color, LEAVING all the data on the screen. MODIFY ------ Before you can modify a record, you need to find it first. If the record exits in the table, and you want to modify any field(s), DO NOT MODIFY THE PRIMARY FIELD just re-enter the field(s) you need to modify and press the MODIFY button, then using the Controller3.php, call modify.php to update your customer table with all the data in program3.php's front-end. Pass data using POST. If the process in modify.php is correctly done, using blue color, display "RECORD $PRIMARY_KEY MODIFIED" on the $message LEAVING all corresponding field(s) on the program3.php front-end. else If the record can NOT be modified in the table, at $message using red color, display "RECORD $PRIMARY_KEY CAN NOT BE MODIFIED, FIND IT FIRST". DELETE ------ Before you can delete a record, you need to find it. When the DELETE button is pressed on the program3.php front-end, controller3.php, will call delete.php. If the record is found in your customer table, delete it from your customer table and on the $message using red color, display "RECORD $PRIMARY_KEY DELETED". LEAVE ON THE front-end of program3.php all the DELETED data of the corresponding record so that the user can re-save the record in case it was deleted by mistake. else If the record is NOT found in the table, at $message using red color, display "RECORD $PRIMARY_KEY CAN NOT BE DELETED, IT DOES NOT EXISTS". CLEAR ----- When the clear button is pressed on the program3.php front-end, controller3.php will call clear.php which will set all memory values to "" and then controller3.php will call program3.php front-end, which will display all current memory values, Special Instructions: - Additional code samples: http://users.cis.fiu.edu/~mrobi002/databases/cgs4854/ http://users.cis.fiu.edu/~mrobi002/includes/OcelotCreatingWebsite http://users.cis.fiu.edu/~mrobi002/includes/Web.php - In program 3, FIX the errors, if any, that you had in program one and two to avoid losing points again. Submission of program 3: ------------------------ 1 - Zip your public_html folder and rename it as follows: your last name, first initial of your first name, pgm3, zip and upload it to CANVAS, when this program is due, or before. If you have any questions, please 1 - email me 2 - Ask our FREE professional tutors at PG6 Room 102