The following video is done through MAMP.
The PHP processes can also be done by uploading to your provided remote folders.
However, the database work does require MAMP/WAMP - Download and instructions here
*This is not required, but you are welcome to try
Part 2
- Objectives:
- Discuss how php works
- Using MAMP to emulate a server and database
- Work through some examples of php to demonstrate how information is passed
- Get
- Post
- Cookies
- Database
- Demonstrate the structure of a home made content management system
-
Here is some php code to get you started...
*Note...This section of class is very buggy. Consider it a lecture demonstration but follow along as best you can.- PHP info - supplies information such as which php version is being used and what attributes are turned on
- <?php
// Show all information, defaults to INFO_ALL
phpinfo();
?> - Note* To test this code for yourself, please install MAMP or WAMP
- * To use a database wizard you will need to download a depricated extension into Dreamweaver:
Server Behaviors and Database
- <?php
- Php is a dynamic language...which means that information is passed based on a users actions. Otherwise the pages are static and unchangable.
- There are different ways to pass information to other pages - which means there has to be a method of storing the information
- Passing information through the URL (the get method in forms)
- Using a post method in forms that passes hidden information
- Setting Cookies
- Sending information to a database
- Passing information through the URL
- On the original page add ?variablename=result
- ex: animalpage.php?mypet=Cat
- On the second page to fill in the approriate area with
- <?php echo $_GET['mypet']; ?>
- Here's how it works
- PHP info - supplies information such as which php version is being used and what attributes are turned on