alejandro52 Posted May 20, 2007 Share Posted May 20, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/52236-newbie-quest-importing-text-from-document/ Share on other sites More sharing options...
MadTechie Posted May 20, 2007 Share Posted May 20, 2007 to pull the cat=5&sub=23 you would use $_GET['cat']; and $_GET['sub']; but it won't work.. you have an ASP page not php Quote Link to comment https://forums.phpfreaks.com/topic/52236-newbie-quest-importing-text-from-document/#findComment-257707 Share on other sites More sharing options...
alejandro52 Posted May 20, 2007 Author Share Posted May 20, 2007 to pull the cat=5&sub=23 you would use $_GET['cat']; and $_GET['sub']; but it won't work.. you have an ASP page not php I think you posted in the wrong place. Quote Link to comment https://forums.phpfreaks.com/topic/52236-newbie-quest-importing-text-from-document/#findComment-257714 Share on other sites More sharing options...
MadTechie Posted May 20, 2007 Share Posted May 20, 2007 OK whatever! Quote Link to comment https://forums.phpfreaks.com/topic/52236-newbie-quest-importing-text-from-document/#findComment-257717 Share on other sites More sharing options...
Barand Posted May 20, 2007 Share Posted May 20, 2007 Mad techie was refering to this This is one of the news pages udate dynamically http://www.toniaantoniou.gr/antoniou/server/programs.asp?cat=5&sub=23 so if someone is posting in the wrong place, it isn't him. Quote Link to comment https://forums.phpfreaks.com/topic/52236-newbie-quest-importing-text-from-document/#findComment-257726 Share on other sites More sharing options...
alejandro52 Posted May 20, 2007 Author Share Posted May 20, 2007 OK whatever! oops sorry that was for me?? didn't understand i think you said. The links aren't my page. they are just an example to see what i mean. Quote Link to comment https://forums.phpfreaks.com/topic/52236-newbie-quest-importing-text-from-document/#findComment-257727 Share on other sites More sharing options...
seb hughes Posted May 20, 2007 Share Posted May 20, 2007 What your wanting to do, I would probs do it in PHP/MySQL and use relationships Quote Link to comment https://forums.phpfreaks.com/topic/52236-newbie-quest-importing-text-from-document/#findComment-257732 Share on other sites More sharing options...
Guest Posted May 20, 2007 Share Posted May 20, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/52236-newbie-quest-importing-text-from-document/#findComment-257734 Share on other sites More sharing options...
alejandro52 Posted May 20, 2007 Author Share Posted May 20, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/52236-newbie-quest-importing-text-from-document/#findComment-257838 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.