This is a discussion on "making a variable durable on redirect" within the PHP Forum section. This forum, and the thread "making a variable durable on redirect are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
making a variable durable on redirect
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
making a variable durable on redirect
Greetings to the group...
I would like to pass a variable from the first page form to a thrid page - but the third page is reached through a redirect from the second page: header (location etc.php) not a SUBMIT and POST. I thought of $_SESSIONS but did not think this to be the best approach. Or GLOBALS. and I heard something somewhere about a PHP version of style sheets and maybe that is the answer. Any advice out there? David |
|
|
|
#2
|
|||
|
|||
|
Re: making a variable durable on redirect
You could use in the redirect url?variablename=vairablevalue
So you could then GET the value on the next pages. |
|
#3
|
|||
|
|||
|
Re: making a variable durable on redirect
Thanks for the response!
GET work well - I am trying another approach that seems promising - let me know if there is a potential problem that I'm not seeing - On the site I am creating, I need some variables for most pages so I post them in a "defined_variables.php" file. Every page requires_once this page and the variables are always there for me... To solve the problem I wrote about, making a variable available to a page without using POST several pages later, I can simply write the $var to this defined_variables.php file....Yes? Still Learning... David |
|
#4
|
|||
|
|||
|
Re: making a variable durable on redirect
yep that could work.
You could also use constants. |
![]() |
| Tags |
| making, variable, durable, redirect |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 301 redirect | nate2099 | Website Planning | 3 | Apr 8th, 2008 10:20 |
| 301 redirect in SEO | geraYY | Search Engine Optimization (SEO) | 26 | Feb 24th, 2008 20:33 |
| Is there a way to redirect... | dudester123 | JavaScript Forum | 3 | Sep 11th, 2006 17:24 |
| php redirect | saltedm8 | PHP Forum | 16 | Jun 20th, 2006 19:30 |
| redirect | benbacardi | PHP Forum | 1 | Apr 28th, 2005 18:06 |