Assuming the server supports PHP you should be able to access something like 'phpmyadmin' which allows you to create and edit a database and the tables within your database.
Once you have the database set up it's suprisingly simple to grab data out of the database and format it however you want.
Here is a page I made some time ago while I was learning how to do it:
The following code is for the main news page
Code:
<link rel="stylesheet" type="text/css" href="style_main.css" media="all" />
<html>
<body class="section-1">
<?php
include 'head.php';
include 'tabMenu.php';
include 'newsContent.php';
?>
</body>
</html>
As you can see it's basically just the head with whatever crap you want in there, then the code for the menu and finally the code for adding news to the page.
The 'newsContent.php' file contains all the code to perform the following actions:
1. Set up the database connection string
2. Select the database we wish to access
3. Create a query
4. Perform the query
5. Copy the results into an array
6. Format and output whatever parts of the array we want to use
1. Set up the database connection string
Code:
$dbcnx = mysql_connect("servername e.g. localhost", "username","password"); //set up our connection string
//Do some validation here to check the connection succeeded
2. Select the database (inc. validation)
Code:
if (! @mysql_select_db("databasename", $dbcnx) ) //select a database, if we cannot find it generate an error. note: @ disables php errors and lets us use our own
{
echo( "
Unable to locate the tablename database at this time.</p>" );
exit();
}
3. Create the query
Code:
$query=" SELECT * FROM news ORDER BY dateSub DESC ";
This would select all items from the news table and order then by the datesubmitted field (DESC reverses the resutls so you get the newest items at the top)
4. Perform the query
Code:
$result=mysql_query($query);
This will just pull all selected data out of the database and put it in the variable; "result".
5. Copy the results into an array & 6. Format and output whatever parts of the array we want to use
Code:
while($thenews = mysql_fetch_array($result))
{
echo " <div class='newsitem'> ";
echo "<div class='header'> $thenews[title] </div>";
echo "
$thenews[synop] </p>";
echo "
Posted by $thenews[authName] at $thenews[dateSub] </p>";
echo "</div>";
}
Here loop through all of our results (a while loop will keep going while a certain critera is true, in this case the critera is that we still have results to be processed. Once where are no more records to output the loop will finish) copying the data into another variable; 'thenews'.
We then output the contents of this variable with formatting information. In this example the CSS class 'newsitem' contains code to put a box around all the content so each news item appears to be a seperate object.
The next interesting part is where you create a link to the whole article in the title of the news item (assuming that's how you want the site to work). In the link it is important that we insert the article's ID so when we click the link we can have some simple PHP code to read the info from the URL, query the database for the article with a corrisponding ID and display this article in a new page.
The way I have set up my table is to have a synopsis field which the article's author writes when they submit the article. You could have some clever code which extracts, say, 100 words from the article's main content and displays that but I couldn't be arsed when I wrote this.
Here is what it looks like when it's opened in a browser:
Now you need the following things:
1. Code to limit the number of articles per page/create new pages when the number of articles increases
2. A login system (for content contributors to use)
3. A webform which allows you to insert data to the database
I'm really new to PHP (I've only ever made this one site and never finished it as I had too much else on) so take all this info with a grain of salt. This may not be the best way of doing it but it seems to work well.
Oh, and I don't know about the web hosting company. I think there are probably web host review sites floating around the net. Check those out.