CPT-283 Landing Page
What Am I Learning This Week?
Chapter Exercises
Each chapter concludes with exercises to demonstrate new skills.
Lab 02-1: Build the Product Discount application
In this lab I coded my first PHP statements to post user data, format calculated data, and protected from potential attacks.
Lab 02-2: Enhance the Future Value application
I made some changes to improve data validation to prevent users from entering unrealistic interest rates and added a statement to print the date of the calculation.
Lab 04-1: Enhance the Product Manager application
Chapter 4 introduces MySQL and phpMyAdmin. I used PHP Data Objects (PDOs) to work with an actual online database to get and modify data.
Lab 05-1: Enhance the Guitar Shop application
This chapter introduces the MVC pattern to organize your code. Functions were coded as well as redirect requests and requests using the Post-Redirect-Get pattern.
Lab 06-1: Trace with echo statements
With an emphasis on testing and debugging, echo statements were inserted into the Future Value application to trace the execution of the code as part of the debugging portion of the process.
Lab 07-1: Get input and display output
Working with form data, I displayed data entered by the user, accounting for XSS attacks, special characters and line breaks
Lab 07-2: Enhance the Future Value application
The input for the form was changed from text boxes to drop=down lists for improved security.
Lab 08-1: Use if and switch statements
Using the Invoice Total Calculator I edited an if statement to adjust discount percentages and customer type with different breakdowns. Then I coded a switch statement to do the same thing.
Lab 08-2: Use Loops
I added code to the Loop Tester program to calculate the total and average of three scores, then I used a for each loop to validate user entries. I then modified the code to process the rolls of a die using a for loop to replicate 10,000 rolls. I also used a for loop to display a drop-down box containing all options for the die.
Lab 09-1: Write Code That Works With Strings
This lab uses the String Tester program to showcase the ability to validate data input as strings. I validated a name, separated off the first name for later use, validated an email address for the existence and placement of the '@' and '.' symbols, and I validated a phone number then formatted it to display a seven or ten digit number using dashes in the appropriate places. All these values were used to create a concise message after the user submits correct entries or displays the correct error message otherwise.
Lab 09-2: Write Code That Works With Numbers
Here I wrote code to validate the existence and value of three numbers. I then used common mathematical functions to round, truncate, and find the ceiling of the numbers, find the minimum and maximum of the three values entered, and generate a random number between 1 and 100. All values were then formatted and displayed unless an error message was generated during data validation, in which case the error message is displayed.
Lab 11-1: Work with the arrays of the Task List Manager application
I modified the code of a previously existing array to sort the array and modify values within the array, improving the functionality of the common task list.
Lab 12-1: Modify the Shopping Cart application
I started working with cookies. After altering the code to create a session cookie I then rewrote the code to create a persistent cookie to last 3 years. I then created a button to give the user the ability to end the session and delete the cookie in the application's cart.
Lab 12-2: Improve the Task List Manager application
Improvements to this simple task list began by creating a persistent cookie that lasts for one year. The application had previously stored arrays for both errors and the actual task lists, which I converted to storage in the session and not in the array that was previously storing the tasks.
Lab 13-1: Modify the Shopping Cart application
This lab focused on coding using functions within a library which I uniquely identified with a namespace. I altered the program to rely on variables within these functions to handle data processing and navigation rather than involving the session cookie with every detail of the code. The cookie was still used, but the code was simplified by using variables defined with these functions.
Lab 15-1: Modify the long version of the Registration application
I focused on changing up syntax for certain types of data validation, modified password requirements, and made certain fields optional.
Favmovies1
So far all I've done is upload all the required documentation, updated the links, and ensured they were working properly. I also looked at some of the code and played with the program to see how it works.
Favmovies2
So far all I've done is upload all the required documentation, updated the links, and ensured they were working properly. I also looked at some of the code and played with the program to see how it works.
Vehicle Log Project
lab 2- Database access was configured in this lab, then that connection was used to display all records in one of my tables. I chose to view the vehicles. lab 3- create a form to add a record to the database. lab 4- created an interface to edit records in the database.