Forum Moderators: coopster
I am less than a newbie here, so please be kind.
What I need:
I am wanting to change my whole web site to place my articles into a database and use a single template to show them.
I would also like to be able to paginate the articles but I am at a loss as to how to do that.
I understand that these things can be done using DHTML with php and mysql but that is as far as my understanding goes. When tutors begin talking about things like this, they all seem to start at least at the intermediate level.
Does one have to start from scratch in all these things to be able to do what I want to do? I'm 76 years old and to begin at the bottom is more than a steep learning curve for me.
If someone could help I would be deeply grateful.
My web page address is under my signature.
Thanks for any consideration.
Ken Browder
[edited by: jatar_k at 4:18 pm (utc) on Aug. 18, 2008]
[edit reason] no sigs or urls thanks [/edit]
It seems you are looking for a content management system (CMS). Have you considered using an existing CMS? They require little or no coding, which should save you from learning PHP and MySQL. Many of them, like websitebaker, are free software, and may suit your needs.
No, I've been there and done that. I want control over my site that I can't do with CMS.
I guess these things are just too complicated for me. It was hard learning HTML and CSS.
I'm trying to simplify everything so that there is just not so much work to making changes.
I was checking out PHP and MYSQL but it seems that they talk about lines and tables, etc.
I'm wanting to keep my articles (pages) in a database to be called by maybe PHP.
I think maybe it is just too difficult for me and that I will just have to be satisfied with what I have. I don't want to change the look of the pages and with CMS I would have to be able to go in and make many changes to keep my look.
thanks anyway. I am grateful for the reply.
Ken
For your MySQL table, look up PHPAdmin. Google 'php tutorials' and 'mysql tutorials' to learn the rest. If you have questions while trying to learn from tutorials, people here wil be willing to help you.
database:
1 table "articles": cols: id, date, title, content
code for site:
<html>
<head></head>
<body>
<?php
// connect to mysql database and select the correct schema
mysql_connect('DBHOST','DBUSER','DBPASS');
mysql_select_db('DBNAME');
// query database for latest 10 articles
$query_articles = "SELECT * FROM articles ORDER BY date LIMIT 10";
$articles = mysql_query($query_articles);
// loop through each article fetched from the database
while($article = mysql_fetch_array($articles)) {
?>
<div id="post">
<h1><?php echo $article['date'] ." - ". $article['title']; ?></h1>
<p><?php echo $article['content']; ?></p>
</div>
<?php } ?>
</body>
</html>
[edited by: Radium at 8:55 pm (utc) on Aug. 18, 2008]
Anyway thanks for your help.
Ken