Database Driven Website

Dear All,

I want to know how website will be made/languages used with following requirements :

I am roughly 1000 Page Static Website. Each page contains 1 main heading, sub heading, content and 2-3 photos per page

along with the main template of the website. I had made it by making 1000 static pages and its hectic to maintain. I want a

website which should be like this :

  1. I want to place all 1000 articles in txt OR doc OR rtf … OR any format… in 1 folder.
  2. 2000-3000 Photos in another folder. (2-3 Photos per page)
  3. Now when anyone clicks any of the thousand links in main template, a PHP code or any server side language code should

pick up an article from txt file and images from ‘photos folder’ and make a page which includes article ,images placed at

proper place.

Now how can i do it ? What languages will be involved ? How it will be made ? Kindly help me out !

You’re asking too broad a question, you’d be better off using WordPress, Joomla, or Drupal and building a simple CMS with it.

create a mysql or sqlite database.
if your website is php enabled and has access to mysql, I suggest you use this option, if not sqlite is built into php and you could use that.

  1. create a database. Go into your mysql link on your server, there you will find options to create a database (DB from now).
  2. Create DB following the instructions on your site.
  3. create a table to hold your information such as:-
    titlename
    description
    author
    time created
    article
    image
    ect
    in mysql :-
    create a seperate file to control your settings eg:- username. password ect
    in sqlite
    create the same.
    sqlite example:-
    set up a new folder called sqlite.
    open a new file.
    name it “config.php”
    enter:-
    <?php
    $sh = “sqlite/sh”;
    $db = @sqlite_open($sh, 0666, $error);
    ?>
    now create a table:-
    <?php
    include “config.php”;
    $sq = “CREATE TABLE article (
    id INTEGER PRIMARY KEY,
    titlename VARCHAR,
    author VARCHAR,
    description VARCHAR,
    imagefile VARCHAR,
    imagedescription VARCHAR,
    article TEXT,
    tm DATE DEFAULT ‘0000-00-00 00:00:00’)”;
    $result = sqlite_query($db, $sq);
    if (!$result) die(“Could not create table it’s somebody else’s fault”);
    ?>
    now you can insert data, select data and organise your site… BEAUTIFUL PHP (THANK_YOU GOD RAMUS)
    mysql would be very similar. Look-up a tutorial on the subject. W3schools has a very clear, easy to follow mysql tut. hope u get it right.

Thankyou for your answer. I am a simple web designer thats why it is a bit diificult to grasp an idea. Well, i am restructuring my question . Kindly tell that your answer is applicable to this question. Thanks

  1. Is there a way that i make a template and leave blank the content area and photos area. When user click on any link eg XYZ then any script/code ( javascript/PHP…) grabs the content from txt file and photos from photos folder and combine in a new page mywebsite.com/xyz.html or mywebsite.com/xyz.php. In this way i will not need to make thousand pages manually.
  2. If this is possible then will google add such pages in search engine ?

@chintoo123,

Can you supply a link to your site.

I have sent website address in pivate message