I’m certain this is possible, I just have yet to figure out exactly how. I’ll try to simplify my problem into an easier example and break it down to the need-to-know information as best I can, but since I’m not an expert, I’ll pass along any information that seems helpful in solving the problem.
I’m writing a Citation Generator (it makes bibliography entries) for my college, and the script for the generator itself is almost complete. It’s basically a complex form submitted POST, where on every form-resubmit (and there are a lot of them), all of the POST variables are maintained through hidden tags generated at the top of the form. Since the script is already over 7,000 lines long, I have no intention of recoding anything at great lengths, so if someone here is to suggest I start using a Session or Cookies, it needs to be something that I can just copy in and have working transparently.
Here’s the problem:
The script itself is going to be part of a larger web page, which php-includes the header, the generator script, and the footer. On the sidebar of the page, I have various url-encoded links that will act as hot-links (automatically building the form up a bit) and also serve up auxillary information on the topic that wouldn’t appear otherwise.
here’s the URL, since that explanation may have been confusing: [url]http://ugoto.calvin.edu/~jas26/index.php
My problem is that every time a link is clicked, I lose all of the POST data that the form has been storing up. Also, when I click a link, the GET value is converted to a POST (inside the included script). I want said links to effectively MODIFY my POST data, and not lose it with every click.
In the end, the three standard links up top (APA, MLA, Chicago) should all act like switches, just the same as the first Select box in the form does. Meanwhile, the sidebar (Book, Periodical) needs to also be able to change the $_POST[‘resource’] variable.
How can I make sure that the POST variables aren’t reset when a user clicks one of those href links? Everything I’ve tried with hidden tags (in the form as well as an additional function making them in the main index.php file) hasn’t done any good at all.
I hope someone follows and sees what it is I’m wanting here, if not I’d be happy to try again at describing it.