Help building a news system.

This is what i want to do:

-Write script that will allow certain people to post a new message, with a title and date -display the most recent article on the homepage of the site. -display a list of the last 5 or so written posts, linked by title(i could do this the long way but i dont understand how to do it the short way, more below). -under the links in the list, i want to take the first few words from the body of the corresponding post. so that it would be something like

Title
“this is the first ten words of the article, here…”

-i want to have it so that i dont have to code a page for everyentry, but i want each entry to get its own page. i know that has somethign to do with the way the link is written, but i do not understand how to call a certain entry from a table.

i know this is possible, i just do not understand how to do it.
thanks in advance

for the cutting off of the text… use [phpref]substr[/phpref]

thank you, i wonder if i could use that with another function to count words.

my biggest problem is in the way the article is called once inserted into the database. I just want the system to automatically link it, without any foot work from me.

If you use explode() on spaces with a limit than implode back, you truncate to a word count. It’s not very clean but it works and it’s quick.

Sponsor our Newsletter | Privacy Policy | Terms of Service