Jump to content


Photo

Making a News Website! Need help!


Best Answer cyberRobot, 23 October 2017 - 01:03 PM

Have you looked into building dynamic (aka database-driven) websites with PHP and MySQL? Basically, the information that needs to be displayed on multiple pages, like your headlines, articles, etc., would be stored in a database (eg MySQL). Then you create whatever page scripts are needed to display the information. For example, you would have one script for the home page which would query the database to pull the newest headlines. Each headline could be a clickable link that passes the article ID to another page script designed to display the article details. The details script would pull the article information from the database using the passed ID.

Go to the full post


  • Please log in to reply
3 replies to this topic

#1 soche123

soche123
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 21 October 2017 - 12:24 PM

hello friends, I'm making a website that will have daily news on sports, world affairs, national and other stuff. But I'm facing two problems right now.

1. How do I display a news article on a separate page? Do I have to create a new page for every headline on the index page?so when user clicks on the headline he is is located to the detail of that page address? How do I handle loading detail article?

2. Second problem I'm having is how do I manage information date wise?I mean sure I want current date data displayed on the index page but same time I want user to access the older data when they perform queries. Please help me. I'm a beginner and I don't have any idea how to do this.



#2 archive

archive
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 22 October 2017 - 12:30 PM

Have you started learning the basics of HTML?



#3 cyberRobot

cyberRobot
  • Moderators
  • Much to Learn
  • 2,764 posts

Posted 23 October 2017 - 01:03 PM   Best Answer

Have you looked into building dynamic (aka database-driven) websites with PHP and MySQL? Basically, the information that needs to be displayed on multiple pages, like your headlines, articles, etc., would be stored in a database (eg MySQL). Then you create whatever page scripts are needed to display the information. For example, you would have one script for the home page which would query the database to pull the newest headlines. Each headline could be a clickable link that passes the article ID to another page script designed to display the article details. The details script would pull the article information from the database using the passed ID.



#4 soche123

soche123
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 25 October 2017 - 08:37 AM

Have you looked into building dynamic (aka database-driven) websites with PHP and MySQL? Basically, the information that needs to be displayed on multiple pages, like your headlines, articles, etc., would be stored in a database (eg MySQL). Then you create whatever page scripts are needed to display the information. For example, you would have one script for the home page which would query the database to pull the newest headlines. Each headline could be a clickable link that passes the article ID to another page script designed to display the article details. The details script would pull the article information from the database using the passed ID.

yeah that's what I'm doing. I'm using PHP and MySQL.

 

but I'm bit confused with the database. How many tables should I have in my database? Since there so many sections in news like national, international, sports, entertainment, business. 

 

currently I have only two. One for categories and other for news which has all the title, description,category,details, image and date. Is it okay if I only use two tables?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users