Forums

PHP

This topic is locked

Redirect and variables

Posted 22 years ago
1
has voted
22 years ago 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 22 years ago
22 years ago 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 22 years ago
22 years ago 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
tim@udzone.com
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