making a variable durable on redirect

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 14th, 2006, 20:22
Junior Member
Join Date: Mar 2006
Location: usa
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote

  #2 (permalink)  
Old Mar 14th, 2006, 21:48
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
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.
Reply With Quote
  #3 (permalink)  
Old Mar 17th, 2006, 20:17
Junior Member
Join Date: Mar 2006
Location: usa
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #4 (permalink)  
Old Mar 17th, 2006, 20:31
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: making a variable durable on redirect

yep that could work.

You could also use constants.
Reply With Quote
Reply

Tags
making, variable, durable, redirect

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 11:32.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43