PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 28th, 2004, 09:50 PM
xadio xadio is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 4 xadio User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to xadio
Redirecting users with php.

I am creating an ordering system and I need to send information between pages. Currently I am using php and forms to send the information from one page to another.

Right now however I am stuck because I need to analyze some information: if it is answer A redirect to page A, B redirect to page B, and neither return to previous page. Currently my problem consists where I cannot figure out how to automatically redirect and send variables to the next .php. I know how to redirect via headers:
PHP Code:
 header (Location: [url]http://www.test.com/whatever[/url]); 

</font> </font>

and Meta tags:

HTML Code:
Code:
 
 	<META HTTP-EQUIV="refresh" CONTENT="1;URL=http://www.test.com/"> 
  


Any suggestions? Do I need to clarify? THanks in advance for the assistance.

Xadio

Reply With Quote
  #2  
Old June 29th, 2004, 04:16 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 6
I would recommend using the header redirection but remember you can only use this method if NOTHING has been sent to the browser yet. To pass information on to the page your redirecting to build a query string and add it on to the url you redirect to. eg

www.test.com/whatever/page.php?var1=a&var2=b

Then you can get this information out the other side using the $_GET array.

Hope this helps,

-KM-

Reply With Quote
  #3  
Old June 30th, 2004, 12:47 PM
xadio xadio is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 4 xadio User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to xadio
I see... thank you much. I didn't know that. Again thank you very much!

Reply With Quote
  #4  
Old July 1st, 2004, 06:28 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 6
As another thought you could also store the information in session data and access it via $_SESSION. Theres loads of internet tutorials about session data around so won't bother repeating the details.

-KM-

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Redirecting users with php.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT