tags:

views:

298

answers:

6

OK I'll try again, sorry if it's too simple for you; we all have to start somewhere.

I need to use a webpage to specify the layout of the newspaper ie header, footer and news areas. This is produced by an HTML page which I have created [the one with check boxes and a create button].

A second web page is to add content to the various components; again, I have the HTML page with 3 sections for input to the header, body, and footer, each with a save button. The content then needs to be output.

The information is to be stored in a MySQL database, but I only need to use the web forms I have already created in HTML to design the layout and add content. The database is to store the layout and content information.

Changes to the database tables should dynamically reflect changes in the presentation page.

The database I have already created has 6 linked tables so far [layout, header, footer, local,national and international]. I also know the MySQL code to link with the database, but not how to code to POST information to the database from the web pages via php handling to the database or GET information from the database.

Can anyone help?

A: 

Look into:

  1. drupal
  2. wordpress

As starting points. Good luck.

Adam Markowitz
+1  A: 

It sounds like you are reinventing the while, and all the problems that will come long with it. May I suggest you use an existing CMS? There are a myriad of options, but some of the more famous that come to mind include...

  • Plone
  • Joomla
  • Drupal
  • TYPO3
  • WordPress

There is even a wikipedia page on the subject: Web content management systems

Stu Thompson
+7  A: 

What I've learnt so far:

  1. If you create a CMS you'll gain tons of programming experience.
  2. If you want to build a news portal for a real client avoid [1] and use an existing CMS.
cherouvim
+1 very well put, more so than my answer...
Stu Thompson
I've being reinventing this wheel for years, and it has been fun.
cherouvim
+2  A: 

Although there are a number of frameworks and cms's systems that you could use. The php commands you are looking for to interact with the database you will find here.

http://ca2.php.net/manual/en/function.mysql-query.php

I hope this helps.

A: 

I have had success using WordPress in this fashion and would recommend it.

This post was helpful to me doing something similar: http://blueprintds.com/2008/03/13/top-10-wordpress-cms-plugins/

As far as composing a page with separate content sections there are several approaches to take. Here are 2 common ones.

Approach 1: Make your theme's page or index template pull the content from separate "pages" or "posts". Choosing the section to include based on either categories you set on the "page" or "post" meant to display in that section or a customfield value indicating they are to be displayed in a section. I like this approach cause you get the nice html wysiwyg editor and versioning for the content.

Example of template:

html
<? php /*call main pagecontent*/ ?>
html
<?php /*call 2nd section of pagecontent (posts where category = '2nd section' limit 1)*/ ?>
more html
<?php /*call 3rd section of pagecontent (posts where category = '3rd section' limit 1)*/ ?>
etc

Approach 2: Use custom fields for the separate content sections for a single post (number of disadvantages here but it might be more straightforward to get something quickly.)

If more detail is desired for the above let me know.

j0tt
+1 for the awesome link.
Andrew
+1  A: 

I am actually working on a similar project. Dont use an existing CMS... most cms are overkill for something this basic... It also gives you more control over everything and it is a great way for a beginner to learn PHP and how to work with databases... One tool I have found helpful is FCKeditor... It allows the client to create a detailed layout just as if they were using Word but will return HTML to you...

Josh Curren