str0kes Posted July 8, 2012 Share Posted July 8, 2012 Hello guys, thanks for viewing my first post here. I am new on php, started to learn it. Well, I am looking for simple news script. All I found till now are a bit complex for me. I need to understand first how this script work. All I need is for example: Todays news 1. News one - 08/07/2012 2. News two - 08/07/2012 Old news 1. news one - 07/07/2012 2. news two - 06/07/2012 Well, the script which automatically moves news to the archive (old news table on database) at the end of the day. I would like to fin such script and with comments, to understand how the things are working. Thanks in advance Quote Link to comment Share on other sites More sharing options...
cs.punk Posted July 8, 2012 Share Posted July 8, 2012 I'd suggest learning the basics of PHP first and then try to attempt to write a similar script or understand a third party script. Quote Link to comment Share on other sites More sharing options...
downah Posted July 8, 2012 Share Posted July 8, 2012 Think about it logically, how does this script work and what do you need? To add news you need a page, with a text input for subject, a text area for content in a form with a submit button, this links up to a php script which then in return takes those values from the previous form, and puts them in the database. You need a page which displays news, this will contain a looper that gets all news out the database and displays it. You need a script on cron job (timed on the server) so that the script will run at a specific time every day (to move news to old news) And from there you can start building more exciting features like editing and deleting news etc a fancy text area maybe? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.