blink359 Posted May 3, 2009 Share Posted May 3, 2009 Hey i wanted to put a news section on the front of my page but i wanted it to be "posted" by me the Admin of the site is there any code i can get or download or any ways to go about it that would be great! Thanks Blink359 Quote Link to comment https://forums.phpfreaks.com/topic/156627-need-some-help/ Share on other sites More sharing options...
Ken2k7 Posted May 3, 2009 Share Posted May 3, 2009 Wordpress? Quote Link to comment https://forums.phpfreaks.com/topic/156627-need-some-help/#findComment-824729 Share on other sites More sharing options...
blink359 Posted May 3, 2009 Author Share Posted May 3, 2009 What do you mean by word press thats for a blog im trying to do something else at the minute the blog is something im going to do l8r Quote Link to comment https://forums.phpfreaks.com/topic/156627-need-some-help/#findComment-824735 Share on other sites More sharing options...
mikesta707 Posted May 3, 2009 Share Posted May 3, 2009 well you could just write a script that uploads the text to a database, and then on the front page just show the latest article. Its pretty much basic SQL queries so it shouldn't be that hard to figure out. Quote Link to comment https://forums.phpfreaks.com/topic/156627-need-some-help/#findComment-824746 Share on other sites More sharing options...
blink359 Posted May 3, 2009 Author Share Posted May 3, 2009 Im new to PhP so im not as smart as you Quote Link to comment https://forums.phpfreaks.com/topic/156627-need-some-help/#findComment-824754 Share on other sites More sharing options...
Ken2k7 Posted May 3, 2009 Share Posted May 3, 2009 But as long as you know the basics and know how to connect to the database and perform SQLs, then you're good to go. This code is a good beginner's project because it's really not hard. Set up a database and a table. Give the table an "id" auto_increment field and a "news" field. You can add more later. You can do all this in phpMyAdmin if you want. Add some news entries. In the file where you want to display news, connect to the database, select your table and run a SQL to grab the last 10 or so entries. (The last 10 would be the most recent. You can select them all if you want.) Then display them, most likely using a while loop. Quote Link to comment https://forums.phpfreaks.com/topic/156627-need-some-help/#findComment-824760 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.