Forums

PHP

This topic is locked

Redirect and variables

Posted 14 Aug 2002 18:13:07
1
has voted
14 Aug 2002 18:13:07 Tommi Virtanen posted:
Hi!

I have update-page (which write datas to db); after updating users redirect to ok-pages. How I can redirect some variables from update-page to ok-page. Example text updating. This text is also using in update-page.

Now I have using session variable, which works in update-page, but I don't understand how they can work in ok-pages.

I using W2K, Apache 2.0.39, DWMX and PHAkt 2.

gustavus

Replies

Replied 15 Aug 2002 10:26:52
15 Aug 2002 10:26:52 Aurel Sorin Cirstoiu replied:
Please be more explicit.
Using session variables is a good slution because they will be available in any page where you start the session.

-----------------------
Cirstoiu Aurel Sorin
InterAKT Support
www.interakt.ro
-----------------------
Replied 18 Aug 2002 15:12:43
18 Aug 2002 15:12:43 Tim Green replied:
I don't think there is a need to be more specific. If you're wanting to send data to an OK page, and are using a header("Location: ...." line to do the redirect, the process of sending variables to the next page isn't too difficult.

Say for example you want to send the value of variable called $status, you would use code like this:-

<?php
$url = "okpage.php?status=" . $status;
header("Location: $url";
?>

I hope this helps

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>

Reply to this topic