Hi, im on are schools newpaper page, and i want to know a way to archive the articles they post. Please help. I already have a way of them posting a article using a form and fwrite in php.
:pain:
Printable View
Hi, im on are schools newpaper page, and i want to know a way to archive the articles they post. Please help. I already have a way of them posting a article using a form and fwrite in php.
:pain:
wordpress?
lol.
What are you trying to do? I can't understand your English honestly...
Do you try to read and store articles posted on a certain site? Simply make a HTML interpreter...and a database.
Sorry, Lol
But what i want to do is get a way to archive the posts in a blog type thing i made for the school newspaper.
Well im useing a login posting sessions for only teachers to post. Then use fwrite to a txt files. Then i use the include function to post the words on the article page.
But does anybody have a clue how to keep each post archived or in its on file? so people can reffeer back to them.
Thanks :2gunsfiring_v1:
Archive? as in viewing all the topics/news ever posted?
use a database, not .txt files
PHP Code:<?php
//do this after connecting to the database
$archive=mysql_query("SELECT * FROM news");
while($data=mysql_fetch_assoc($archive)){
$post=$data['post'];//get what they posted
$id=$data['id'];//gets the link
echo("<a href='$id'>$post</a><br>");
//this will echo everything they have ever posted into a link. ?>
Can you tell me how to put the forms text into the database?
honestly, wordpress or stuff like cutephp would be your best bet. its great for putting articles in too.
wordpress uses mysql and php
cutephp uses only php so if you have a mysql deficiency, this is great.