manufacturerIDdisplacementcylindersmodel nameid
1 351 8 windsor 1
1 351 8 cleveland 2
2 350 8 small-block 3
2 350 8 long-block 4
idManufacturer name
1Ford
2Chevrolet
3Allison
4Detroit Diesel
5Briggs & Stratton

assuming that you are using the two SQL tables above, the first of which is titled 'engines', and the second 'manufacturers', complete the following:

  1. Write an SQL query to show engine size, model name, and manufacturer name.
  2. Write a PHP page for editing the contents of the engines table. This page must have a pull-down menu for setting the manufacturerID, and must not allow duplicate model names to exist within the table.
  3. Write a PHP page which shows a list of all manufacturers, and how many engines each has listed in the engines table.
  4. Write a PHP page which allows new entries to be added to the engines table. Again, no duplicate model names are allowed.

The following section deals with regular expressions.

  1. Write a regular expression which will match only the following: somewhere.com, where.com, somewhere.org, where.org, somewhere.edu
  2. Write a regular expression which will match 8 character strings which begin with a number.
  3. Write a regular expression which will match 8 character strings which begin with three numbers.
  4. Write a regular expression which will match 8 character strings which end with three numbers.
  5. Write a regular expression which will match 8 character strings which end with three letters.

the following section deals with RSS

  1. Write a PHP script which will regenerate an .rss page from all the links in the links table of your database. The resultant .rss page must be named 'links.xml', and must be linked from your main index page. All links should be sorted by entry date, with the newest appearing first.
  2. Write a PHP script which will regenerate an .rss page from the ten newest links in the links table of your database. The resultant .rss page must be named 'newlinks.xml', and must be linked from your main index page. The links should be sorted by entry date, with the newest appearing first.

The following section deals with email

  1. Modify your usertable and login page to keep track of how many failed logins a user has. That is, every time their password is entered incorrectly, make note of it. When they have had 5 unsuccessful logins, generate an email to the administrator of your webpage (probably you). When the user successfully logs on, reset the 'failed logins' counter back to zero.