UV Learn - Learning in Cloud made simple easy and effective

PHP for Web Designers

There are many great reasons to learn PHP. You can reduce manual updates to webpages, get user input, and connect to a database of products or other information. But some web designers are intimidated by the theory and jargon.PHP for Web Designers is different. Author David Powers provides a gentle introduction to PHP, through a series of simple exercises that help you develop fully functional dynamic webpages—all powered by PHP. Learn how to reduce website maintenance by moving common page elements to external server-side include files, change content automatically depending on the date or time, display alternate text, gather user input from a form, and link to a database to display product information. The final chapter is dedicated to understanding error messages and fixing their root causes.

Topics include:

  1. How to use PHP in a webpage
  2. Storing and displaying text and numbers in variables
  3. Using functions
  4. Adding comments to your PHP scripts
  5. Moving common page elements to include files
  6. Displaying different content on a page
  7. Working with multiple values in arrays and loops
  8. Getting form input sent by the POST method
  9. Using PHP sessions to preserve data
  10. Storing data in session variables
  11. Connecting to and querying a database
  12. Handling errors

1. Introduction to PHP

  1. How PHP makes web pages dynamic
  2. How to use PHP in a web page
  3. Using variables to store information
  4. Storing numbers and text in variables
  5. Displaying the values of number and text variables
  6. Using functions to manipulate values
  7. Adding comments to PHP scripts

2. Using Server-Side Includes for Common Page Elements

  1. What is server-side includes?
  2. Deciding which include command to use
  3. Challenge: Moving common elements to include files
  4. Solution: Moving common elements to include files
  5. Making sure internal links still work in an include file

3. Using Conditions to change page output

  1. How PHP makes decisions
  2. Changing output depending on the current time
  3. Adjusting the server's time zone
  4. Displaying an up-to-date copyright notice
  5. Challenge: Displaying an image of the month
  6. Solution: Displaying an image of the month
  7. Understanding what PHP treats as true and false

4. Working with Multiple Values in Arrays and Loops

  1. Strong multiple values in a variable as an array
  2. Inspecting an array's elements
  3. Challenge: Inserting the appropriate alt text
  4. Solution: Inserting the appropriate alt text
  5. Displaying an array as a comma-separated list
  6. Looping through an array's values
  7. Labeling array elements
  8. Looping through an array's labels and values
  9. Finding if a value exists in an array
  10. Challenge: Displaying a seasonal feature
  11. Solution: Displaying a seasonal feature

5. Getting User Input from a From

  1. Getting form input sent by the POST method
  2. Retrieving values from a URL's query string
  3. Challenge: Plan the order form
  4. Solution: Plan the order form
  5. Finding and extracting a substring
  6. Organizing the form data into arrays
  7. Using a loop to build a table for the data
  8. Controlling which rows are displayed
  9. Creating a custom function to extract part of a file name
  10. Calculating the order total
  11. Using PHP sessions to preserve data
  12. Storing data in session variables
  13. Ending the PHP session and deleting the data

6. Displaying Content from a Database

  1. Loading data into MySQL
  2. Connecting to the database
  3. Querying the database
  4. Displaying the results of the query
  5. Using modulo division to establish a repeating series
  6. Repeating output at specific intervals in a loop
  7. Linking to a details page
  8. Embedding a variable in a query securely
  9. Handling database errors gracefully and securely

7. Handling Errors

  1. Dealing with PHP errors
  2. Why is my page blank or incomplete?
  3. Tracking down parse errors
  4. What to do with 'faith to open stream'
  5. What does 'headers already sent' mean?
  6. What does undefined index, variable or constant mean?

8. Conclusion

© 2019 UV Learn. All rights reserved.