Passing arbritrary data from one page to another (template)..?
Posted 08 May 2006 - 07:22 AM
Say we've got a dynamically generated static (cached) HTML page comprising a list of blocks of information (text). I'd like to add to the bottom of each of these blocks a link which'll lead to a second page, created on the fly, dynamically, using a different template than the list-page's, which will display the exact same information in the block which led the visitor here.
This is the idea, but I haven't the foggiest where to start looking for info/tutorials on such a concept. I've been searching for info on PHP and "POST" and "GET," but the words are so common that searches bring up irrelevant content (heh); as well, from the trickles of info I have found, it seems these methods're pretty much form-field exclusive and won't be of help (?). I'm guessing it could be done with cookies somehow as well, but if at all possible, I'd like to keep the whole pass invisible -- done in a manner that doesn't touch the visitor's computer at all.
I've thought, of course, that it may be more efficient (or would it?) to generate the individual pages, and have the list excerpt the blocks of info from them, not unlike blog systems' excerpt functions ("Read more..."), but, as evidenced by the fact that I'm trying to modify an existing script rather than build one from scratch, this'd require more code skill that I've got at the moment.
The structure I've devised as example in mind only is marking/wrapping each block with some type of special tag, which is present or related to a special tag in the link, which'll pass the information (formatting and all) contained in the tags thru to the next page. Am I very far off?
How would something like this be done? Is it even possible? Am I getting in over my head?
Any help, so much as a point in the right direction, would be much, MUCH appreciated!
Posted 08 May 2006 - 02:28 PM
It's hard for me to specify anything more since I don't know where the info is coming from, how much of it there is, or what you're doing with it on the other end.
Do you have a website we could look at?
Info: PHP Manual
Posted 09 May 2006 - 03:32 AM
An [a href=\"http://jdoe.awardspace.us/example_list.php\" target=\"_blank\"]example list[/a], which shows what the list looks like, an [a href=\"http://jdoe.awardspace.us/example_template.php\" target=\"_blank\"]example template[/a], which represents the template the second page'll be generated from, and an [a href=\"http://jdoe.awardspace.us/example_result.php\" target=\"_blank\"]example result[/a], which is what I'd like the link from the list to achieve; the first link in the example list illustrates what I'd like the link to achieve, a clean pass to a dynamic result page.
Thanks for the help and thought so far!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users