MCS-243 PHP3 Example

I've put together one example of how PHP3 can be used to provide a web interface to a database. It doesn't illustrate everything you may want to do in your projects, but it at least provides a starting point. Together with the documentation (which is linked into the main MCS-243 page), it should get you going. But please ask for help as you need it.

To see the example from the user's perspective, go to . To see the PHP3 code, look at the files in the directory ~max/public_html/movies/. You may also want to look at the HTML generated by each of the PHP3 files. To do this, use the "view source" option in Netscape while browsing one of the pages .

The only thing I needed to do to make this example work, other than writing these PHP3 files and having the max_movies database in place (from our earlier labs) was to do the following two commands in the psql while connected to my max_movies database:

grant select on movie_info to public;
grant select on movie_actors to public;
This provided public read access (ability to do selects) on these two tables. If you want to provide the ability to only read portions of the database, or to make some additions or changes, you may want to talk with me.

For another example, you can look at the chpwd.html file in my www-docs directory (served as and the chpwd.php3 file it uses from my public_html directory (served off of kilpinen).