Id from GET


Make a DB about something. Shoes, movies, beer, whatevs. Put one table in it, storing data about something. Give the table at least two fields:

  • An autoincremented INT id, that's a primary key.
  • A name, like "Windsor Oatmeal Stout."

Add some rows to the table.

Write a program that takes an id as a GET param, like the wombat thing, and shows the record with that id.

Include validation functions. Show errors when:

  • The id is missing.
  • The id is not numeric.
  • The id is zero or less.
  • The id does not exist in the table.

Use a global variable for the DB connection.

Submit a URL, and a zip of your files.

Where referenced