Page 1 of 1

Can anybody help, simple news script

Posted: Wed Jan 10, 2007 8:29 pm
by .Stealth
ok i was wondering if you could help.

i want a simple news script, and when i mean simple i mean simple lol.

i want it to be php, i dont want to use a database, heres the features i need:

i want it to write to flat files
i want a seperate page for adding the news via a form, 2 fields: title and content
i dont want it password protected as it will be in a seperate protected area anyway
i want to export it via a simple include statment (or something along those lines)


heres what i want it for.

on a page im making i have a menu on the left and a little news section below it, to the right is the content.

all i want it to look like is this:

Menu

home
contact
etc
etc

News

heading

news here news here news here
heading
news news news news


nothing fancy really, i know how to use flat files and i know some php, but i dont know how to use a form to edit the flat file so thats where you come in if you feel like helping me :D


maybe you know of a script already?

ive searched and searched for something as simple as this but they either use databases or have features like:
password protected admin area
comments
etc

all i want the form to do is edit the flat file, so i would type in:

breaking news (heading)

this is breaking news
and another line
and another &

if possible i would like the form to automatically convert that to html so it would export like:

Code: Select all

<u>breaking news</u>
<br />
<br />
this is breaking news<br />
and another line<br />
and another &
maybe not the & if that would be trouble.

i hope you understand what i mean as im stuck lol

thanks alot.

Posted: Wed Jan 10, 2007 10:47 pm
by feyd
var_export() and basic arrays may be of interest in both reading and writing.