PHP
  Home arrow PHP arrow Page 2 - Building a Relational Content Manageme...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Building a Relational Content Management System in PHP/MySQL
By: Roger Stringer
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 27
    2005-12-20

    Table of Contents:
  • Building a Relational Content Management System in PHP/MySQL
  • The Rewrite
  • The Common Functions
  • Managing Articles
  • Displaying the Articles

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Building a Relational Content Management System in PHP/MySQL - The Rewrite


    (Page 2 of 5 )

    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
    [QSA,L]

    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


       · This is a test comment.
       · Hi, first of all thank you for this tutorial. I've just tried your codes but i think...
       · Change:function buildDropDown($parent,level = 1,$articleId){To:function...
       · One more error:$seoname = isset($_REQUEST['$seoname']) ? $_REQUEST['$seoname'] :...
       · I forgot to mention, it's in index.php
       · When i tried to enter an article, the following error occurred:Fatal error: Call...
       · Remove this line: $_POST['akey'] = makeKey(10);akey no longer gets used in...
       · After i had made the last change, it worked.Thank you.
       · Thanks for Tutorial. I'm getting an error message sayingFatal error: Call to...
       · Hi there!It was a nice tutorial and my hopes were high, but I was disappointed. I...
       · It is possible that sessions in PHP in your case not work.
       · i had the same "server encountered an internal error..."the problem was a...
       · Originally, I didn't have a line break in the .htaccess for this article.Must have...
       · Ive read all the above comments and made the necessary changes, but I still have...
       · The header function is touchy. It must be called before anything is sent to the...
       · Hi. I enjoyed your project. Everything works except getting the article itself to...
       · Solution: Turn on (uncomment) mod_rewrite in the httpd.conf file.Works great.
       · Thank you very much for this tutorial. It works great for me with one exception: ...
       · That's a nice tutorial. thank you. but what about deleting an article
       · Anyone Knows how to use FCKeditor? I tried to do so but I can't. I am new to...
       · I got your tutorial to work after reading all the comments and making that one last...
       · I have just gone thru the tutorial and comments and have some aspects working but,...
       · I am using your Relational CMS Tutorial as the basis of a content management system...
       · I have a different database abstraction layer getting my MySQL commands to be...
       · Hello everybody... someone have the code with the changes?.. am still have the...
     

       

    PHP ARTICLES

    - Using Aliases and the Autoload Function with...
    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Sub Classing Exceptions in PHP 5
    - Building a Content Management System with Co...
    - Filters and Login Systems for Web Applicatio...

     
    Application Delivery: Everything You Wanted to Know, but Didn`t Know You Needed to Ask
    A comprehensive guide to examining the topics of Wide-area Data Services and app....

     
    Best Practices: Safe and Secure Hardware Asset Recovery
    Companies increasingly must meet EPA and local requirements for the disposal of ....

     
    Managing SSL Security in Multi-Server Environments
    Read this white paper to learn how to simplify management of your organization's....

     
    Open Source Security Myths
    Open Source Software (OSS) is computer software whose source code is available t....

     
    Power and Cooling Capacity Management for Data Centers
    This paper describes the principles for achieving power and cooling capacity man....

     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
    Stay green...Green IT