Home arrow PHP arrow Page 2 - Building a Relational Content Management System in PHP/MySQL

The Rewrite - PHP

You may be familiar with relational databases, but what is a relational content management system? Read on to learn how to build this system, which helps you create a search engine friendly site fairly quickly.

  1. Building a Relational Content Management System in PHP/MySQL
  2. The Rewrite
  3. The Common Functions
  4. Managing Articles
  5. Displaying the Articles
By: Roger Stringer
Rating: starstarstarstarstar / 39
December 20, 2005

print this article



The mod_rewrite for this script is pretty simple. We basically pass everything to the script to decode.

Create a file called ".htaccess":
    RewriteEngine on 
    RewriteRule ^(.*).html$ index.php?seoname=$1&mode=view

This will make the files all look like a .html file.

The Config

Okay, we need to set up a config.php file to hold the config info.

Create a file called "config.php":
        $sitename = "";// site name
        $siteurl = "";// site url
        $aduser = "";// admin username
        $adpass = "";// admin password
        $dbhost = "";// database hostname
        $dbuser = "";// database username
        $dbpassword = "";// database password
        $dbname = "";// database name

These settings are important and should be set before we start. The variables are broken down as follows:

$sitename=The name of your website
$siteurl=The URL to the affiliate script as it is installed on
your site
$aduser=Your management login username
$adpass=Your management login password
$dbhost=Your database host (usually localhost)
$dbuser=Your database username
$dbpassword=Your database password
$dbname=The name of your database

>>> More PHP Articles          >>> More By Roger Stringer

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: