Passing variables with refresh or redirect

I want to use either HTML or PHP to redirect my user to another page.  However, there are variables being passed from the previous page that need to be passed along as well.

Is there any way to do this OTHER than sticking them in the URL (such as...,variable2=value2,etc)
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jan LouwerensSoftware EngineerCommented:
you can create a form in the page. have the target be the desired page. stick all the values into the form as hidden fields. in the onLoad function of your page, call submit() on your form.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Although this route is more complicated than simply sticking them in the URL query string, as you're trying to avoid, dhuggy. Are you trying to hide this data from your users so that they can't read it, or is there some other reason you're avoiding this solution?
Why don't you use cookies? You can set and retrieve themwith Javascript at clientside.
dhuggyAuthor Commented:
>Are you trying to hide this data from
>your users so that they can't read it,
>or is there some other reason you're
>avoiding this solution?

Not so much so that they can't READ it, but so they can't ALTER it.  In my experience, there's always a wanna-be hacker who tweaks a variable, and it screws up the database or something... it's best to keep it transparent as much as possible.

Also, for purely asthetic reasons, I find those lengthy URLs somewhat gross.  Of course, as a wanna-be hacker myself, I appreciate that they exist, because they've allowed to some interesting portions of a few sites that I couldn't have got to otherwise.

I've gotten sidetracked, but as soon as I can code jlouwere's solution and get it to work, I'll accept his comment as answer.  This seems easier to me than opening the cookie jar... but thanks anyway for the idea, andropov.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.