Managing URLs

The next two pages to be developed will allow users to add URLs and view those already added. This section of the site relies upon three tables in the database: urls, url_types, and url_titles. See the Database Scheme sidebar for details.

Adding URLs

The add_url.php script will perhaps be the most complicated one in the whole Web application (because of the normalized database structure). The script’s form will take a URL, a URL title (or name), a description, and up to three categories. Upon receiving the form, the URL, URL title, and description values will be added to the url_titles table. Then the primary key from that table (title_id) will be used along with the type_id values to add one to three records to the urls table, ...

Get PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.