logo © 1996 Phil Waclawski
Felitaur Site
Offerings
About Me
Crafts
Services
ftp files
Help Files
What's New?
Home Page
Other Links
Anatomy &
Physiology
Arthropods
Biology
Computers
Ferrets
Fun Links
Internet
Linux
S.C.A.
Win 95/NT
Comments or
Suggestions
webmaster@ felitaur.com
   
[Webscripting Homepage] | [Javascript Homepage] | [Perl/CGI HomePage] | [PHP Homepage]
PHP Program Assignment 4
For your second programming assignment, you will create one file. prog4mysql.php
  • Using mysqlcp.php and mysqltest.sql Do the following:
    1. Create the 3 tables in your own database, and get mysqlcp.php working on you account (20pts)
    2. Remove all of the functions from mysqlcp.php and put them in their own include files (30pts)
    3. Create form.php.inc file that generates the form (20pts)
    4. Make a seperate "Cleaner Class" that uses the following as appropriate:
      • trim
      • substr, str_replace
      • strlen
      • preg_match, preg_replace
      • striptags (with any exceptions you feel appropriate
      • htmlentities for printing (unless you wish to ALLOW some tags)
      • Make a testclean.php to test this class out (60pts total)
    5. Create a mysql connection/error class file called mydb.php.inc and a mydbtest.php(80pts)
      • class file should get username and password from outside the public_html directory
        (possibly even using it as a function call argument instead of hard coded)
      • Should allow the passing of database names, queries and so on into and out of class.
      • Should be able to return values to database object created
      • update from the mysql to mysqli functions
    6. In addition to the "view auctions" and "add auctions" functions that will be moved to their own include files in step 2 above (and cleaned up to use the mydb.php.inc class etc) you need to do the following:
      Adding a User:
      Should store a md5 password in a table and do a password/username check) 30pts
    7. All of this should now be accessible from mysqlcp.php (50pts)
  • Print the date at the bottom of the page in the format Monday, January 23, 2005

This page last updated on: