Jump to content

Newbie Quest, importing text from document


alejandro52

Recommended Posts

Hello, i am trying to create a web site that has some pages that will be updated a lot. The thing i want to do is to have my main page display the documents added in the other pages and each one of the other pages have the content updated dynamically. For example one of the pages have basketball news.I want to display the news by date and when the user click on one of the news to display the new itself. The thing is that  i have no idea how to do that. Take a look at that to see what i mean(the pages are in greek but i don';t think it matter to understand the structure).

This is the main page http://www.toniaantoniou.gr/antoniou/

This is one of the news pages udate dynamically  http://www.toniaantoniou.gr/antoniou/server/programs.asp?cat=5&sub=23

 

Also if there was someone here to solve me some questions on the fly since im new would be great. :)

Link to comment
Share on other sites

Hey guys,

 

No, MadTechie was on the right track, however, we're all assuming you know basic php and html (and rightfully). If we're incorrect, then you can't expect us to teach you that. If you want to learn PHP, its your responsibility, if you want someone else to do the job, head to the freelancing section and post up your request.

 

But on the other hand, assuming you are minimally proficient with PHP, then here is MadTechie's explanation expanded:

 

Lets say http://www.toniaantoniou.gr/page.php is your starting point.

 

Somewhere on that page, you have PHP dynamically creating a list of news links. Each of those links should be linked to a news script like so:

 

http://www.toniaantoniou.gr/news.php?date=022307

http://www.toniaantoniou.gr/news.php?date=032607

http://www.toniaantoniou.gr/news.php?date=052807

 

Then in news.php, you'll want to somehow extract that date information from the url, and use it to tell a database where to find a specific news article.

 

And in order to pull that date information, you use (as madtechie suggested):

 

$myDate = $_GET['date'];

 

***

However, MadTechie and I see that at the end of your example url:

 

http://www.toniaantoniou.gr/antoniou/server/programs.asp?cat=5&sub=23

 

You have an *.asp page. Unless you're telling apache to treat .asp  as .php (which I consider unlikely), then you aren't even using the PHP language and our suggestions become invalid--also take into account that this is a PHP community, so unless there is some kind of reason that is not apparent to us (for example, you intend to switch to PHP, or you simply want an explanation of the concept), you aren't asking in the right place.

Link to comment
Share on other sites

That was really helpful. The point for me is to find the steps needed to create a dynamic page like the one i linked so i know what i need to learn, cause i have no idea in php. So to sum it up, i need to create a database with tables for each news section with a date added(date will be the primary key for the home page to show the news). In the tables i will also have a field where I'll add a link to the file so i can link it with the name or the date where the user will click. Is that right?? Also is it better to use repeating regions of dreamweaver(if it's possible) or use php code to generate the tables for the links?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.