I need a comment box made to articles, news articles. So there will be an article with a page like this;
That will show the first article, then change the a to 2 it will show the second article. How would I do that?
Now with the comment box, I am thinking of three ways to do it. I don't know which one to choose. Use a SQL database to hold the comments and the names of the people posting. Another way I was thinking of was put it in a text file and read them out of the text file and print them. They are the two most common, but another way I was thinking was an XML file. Since XML would be quite easy I could have my own tags like.
<comment> <id>1</id> <name>Brandon W</name> <date>12 January 2009</date> <msg>This is where the message will be.</msg> </comment>Get PHP to read each and put them in an array.
[comment][id] [comment][name] [comment][date] [comment][msg] [comment][id] [comment][name] [comment][date] [comment][msg]
What do you reckon would be the best method and how would you do it?
Thanks for the help. I have only ever made small scripts for testing my learning on PHP never for a site.