Page 1 of 1

Begginer help, PHP question, is this possible?

Posted: Sat Feb 14, 2004 11:01 pm
by ccindy
First of all, i am a PHP beginner, I know very little, but am wondering if some things are possible with PHP.

I would appreciate any help.

Question: using a url/link, can I create a link that when clicked, passes variables to an include function on a template page in Dreamweaver telling that include what file to load?

What I want to do is be able to click a link to an article, and have that article load in an editable region (or it could be a non editable region) in a template page. I don't want the article document itself however to be attached to the template. Is such a thing possible? If so, could someone show me an example, or tell me where to look, and possible search terms perhaps?

Also, could it be a link that someone could bookmark and return to later? How would I input this link through dreamweaver, and not in code view? I would need to be able to type or copy and paste these links in java scripts.

Is this at all possible?

Why I want to do this: I want to do this so that I can put each article on its own page, and not have to have the hundreds of pages that would take attached to any template. This would save me a lot of time when updating the pages that are attached to a template. This way I could have the one template page, and have all the other articles load into it. The content of those pages wouldn't need to be updated all at once, just the content on the template page, I could probably not even use a template, just attach everything via a PHP include to one main file? All the formatting would be done via an attached style-sheet.

If I could figure out how to do this though, i could have just the template page, and have all the other pages load into the template.

Posted: Sat Feb 14, 2004 11:26 pm
by m3mn0n
Yes, it's very possible. And it's a defacto standard really. That is pretty much the way things are done from forums, to news sites, and etc. Even this page works in that way.

What you will need is a unique id number amoung all these articles. Then use a "?article=uniqueID" type link on your page. From there you can extract the $_GET variable and extract from a database an article based on this number.

Hope this helps.