Page 1 of 1

Passing A Variable

Posted: Fri Jul 01, 2005 10:57 pm
by Majoraslayer
Alright, so what I'm trying to do is when a user clicks a link, the link will take them to a redirection page. The page will be used for every page from which the user clicks that link, and it always needs to redirect to the previous page.

I have an idea of how to do this, but being a complete n00b to PHP I'm not sure where to go from there. I'm going to create a variable using:
I wrote:$varname=$PHP_SELF
The problem is that the variable will have to be passed to the next page so that I can plug it into the redirection. How do I pass the variable to the redirection page?

Posted: Fri Jul 01, 2005 11:52 pm
by smo
What is the problem if you add the original page name to the query string and get the value in redirection page.

<a href=to_redirect_page.php?source_page_name=page1.php>link 1</a>
<a href=to_redirect_page.php?source_page_name=page2.php>link in another page</a>

Take the value from $source_page_name and use for redirection.

Another way is to use referrer in the redirect page.
$ref=@$HTTP_REFERER;

$ref will give you the page with query string from where the visitor landed.

Posted: Fri Jul 01, 2005 11:57 pm
by Majoraslayer
O_o
*Is a PHP newbie*

Alright, I didn't understand that explanation, but I think I get the idea (hopefully). Thanks for the help!

Also, if you would like to explain that to me as though you were explaining it to a 4 year old, feel free!

Posted: Sat Jul 02, 2005 7:52 am
by Chris Corbyn
Majoraslayer wrote:O_o
*Is a PHP newbie*

...

Also, if you would like to explain that to me as though you were explaining it to a 4 year old, feel free!
I'm assuming that using $PHP_SELF was pure coincedence here and you just want to pass ANY variable between pages.

The simplest approach is to use the GET method which works as follows via the URL:

Code: Select all

&lt;a href=&quote;some_php_page.php?varname=somevalue&quote;&gt;Click me to send the value of `varname` to 'some_php_page.php'&lt;/a&gt;

Code: Select all

echo $_GET&#1111;'varname']; //somevalue in this case
/*
 All values passed via the URL like this go into the array $_GET
 and so you access them like shown above
 */
So if we were redirecting via a script and want to send values to the page we're going to we could do something like this:

Code: Select all

$var1 = 'foo';
$var2 = 'bar';

echo '&lt;a href=&quote;my_redirection_script.php?var1='.$var1.'&amp;var2='.$var2.'&amp;newpage=wherever_we_are_going.php&quote;&gt;Redirect me&lt;/a&gt;';

Code: Select all

//Query to send along in the URL (there's a better way to do this but it's more confusing for a &quote;n00b&quote; as you say)
$query = ''; //Start with an empty string
foreach ($_GET as $key =&gt; $value) {
    if ($key != 'newpage') { //We can remove this since it was for this script only
         $query .= '&amp;'.$key.'='.$value; //Append the next value to pass
    }
}
header('Location: '.$_GET&#1111;'newpage'].'?'.$query); //wherever_we_are_going.php?&amp;var1=foo&amp;var2=bar

Code: Select all

echo $_GET&#1111;'var1'];
echo '&lt;br /&gt;';
echo $_GET&#1111;'var2'];
Another, only slightly more advanced method is using sessions. Very similar to using GET only we don't use the URL....

We have to use session_start(); before any ouputted content on any page which uses sessions.

Code: Select all

session_start();

$var1 = 'foo';
$var2 = 'bar';

$_SESSION&#1111;'var1'] = $var1;
$_SESSION&#1111;'var2'] = $var2;

echo '&lt;a href=&quote;somepage.php?'.SID.'&quote;&gt;Click me&lt;/a&gt;'; //SID is a constant to write out the ID of this session
and

Code: Select all

session_start(); //Don't forget this bit
echo $_SESSION&#1111;'var1'];
The great thing with using sesions is that so long as the browser window remanins open and you put session_start() on any page needing to use the session variables (stored in the $_SESSION array) you can click as many links as you want without losing your data once the session variables have been set ;)

Hope that helps.

EDIT | Doh! Re-read your first post and see what you are trying to do now LOL.

Posted: Sat Jul 02, 2005 7:55 am
by Chris Corbyn
Do you mean you want a link that acts like the "back" button on a browser? Or do you mean they hit a link and bounce to one page then back to the page with the link on? $_SERVER['PHP_SELF'] will only do the latter of the two.

Posted: Wed Jul 06, 2005 12:30 am
by Majoraslayer
Well, what I'm using it for is a page editing script. When the user clicks submit, the browser goes to the processing script that writes the html page. I need a way to always have the processing script go to the previous page.

Posted: Wed Jul 06, 2005 3:11 am
by s.dot
Have a page that processes the information.

Like when they edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

Code: Select all

<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

Code: Select all

&lt;html&gt;
&lt;head&gt;
&lt;title&amey click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php&quote;&gt;
&lt;/head&gt;
&lt;body&gt;
Please wait while you aret;?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header(&quote;Location: $var&quote;);

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?&gt;
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;rrentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&n they edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refrocesses the information.

Like when they edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URrocesses the information.

Like when they edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php&quote;&gt;
o to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
<html>
<head>
<title>Page</title>
<meta http-equiv="refresh" content="3; URL=http://www.domain.com/page.php">
</head>
<body>
Please wait while you are being redirected...
</body>
</html>
[/code]

Hope that helps you.entpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&ampmation.

Like when they edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Pae processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
<html>
<head>
<title>Page</title>
<meta http-equiv="refresh" content="3; URL=http://www.domain.com/page.php">
</head>
<body>
Please wait while you are being redirected...
</body>
</html>
[/code]

Hope that helps you. edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php&quote;&gt;
&lt;/head&gt;
&lt;body&gt;
Please wait while you are being redirected...
&lt;/body&gt;
&lt;/html&gt;
[/code]

Hope that helps you.
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
<html>
<head>
<title>Page</title>
<meta http-equiv="refresh" content="3; URL=http://www.domain.com/page.php">
</head>
<body>
Please wait while you are being redirected...
</body>
</html>
[/code]

Hope that helps you.e

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php&quote;&gt;
&lt;/head&am link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php&quote;&gt;
&lt;/head&gt;
&lt;body&gt;
Please wait whilrocesses the information.

Like when they edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
<html>
<head>
<title>Page</title>
<meta http-equiv="refresh" content="3; URL=http://www.domain.com/page.php">
</head>
<body>
Please wait while you are being redirected...
</body>
</html>
[/code]

Hope that helps you. make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php&quote;&gt;
&lt;/head&gt;
&lt;body&gt;
Please wait while you are being redirected...
&lt;/body&gt;
&lt;/html&gt;
[/code:1:e77a4f04p?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
<html>
<head>
<title>Page</title>
<meta http-equiv="refresh" content="3; URL=http://www.domain.com/page.php">
</head>
<body>
Please wait while you are being redirected...
</body>
</html>
[/code]

Hope that helps you.rocesses the information.

Like when they edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.Like when they edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php&quote;&gt;
&lt;/head&gt;
&lt;body&gt;
Please wait while you are being redirected.to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php&quote;&gt;
&lt;/head&gt;
&lt;body&gt;
Please wait while you are being redfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&rocesses the information.

Like when they edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php&quote;&gt;
&lt;/head&gt;
&lt;body&gt;
Please wait while you are being redirected...

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
<html>
<head>
<title>Page</title>
<meta http-equiv="refresh" content="3; URL=http://www.domain.com/page.php">
&lt;/head&gt;
&lt;body&gt;
Please wait while you are being redirected...
&lt;/body>
</html>
[/code]

Hope that helps you.e

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php&quote;&gt;
&lt;/head&gt;
&lt;body&gt;
Please wait while you are being redirected...
&lt;/borint anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables y edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
<html>
<head>
<title>Page</title>
<meta http-equiv="refresh" content="3; URL=http://www.domain.com/page.php">
</head>
<body>
Please wait while you are being redirected...
</body>
</html>
[/code]

Hope that helps you.age, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php&ke when they edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
<html>
<head>
<title>Page</title>
<meta http-equiv="refresh" content="3; URL=http://www.domain.com/page.php">
</head>
<body>age" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php&quote;&gt;
&lt;/head&gt;
&lt;body&gt;
Please wait while you a
Like when they edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php">
</head>
rocesses the information.

Like when they edit things, make the link that they click on go to "editinfo.php?var=currentpage" for example

then on your page that processes the information (editinfo.php?var=currentpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php">
</head>
<body>
Please wait whilntpage, in this example) include

[php]
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
<html>
<head>
<title>Page</title>
<meta http-equiv="refresh" content="3; URL=http://www.domain.com/page.php">
</head>
<body>
Please wait while you are being redirected...
</body>
</html>
[/code]

Hope that helps you.
<?
/* process whatever information
 * that needs to be processed from
 * the previous page as long as you
 * don't print anything to the browser
*/

header("Location: $var");

/* the $var variable is coming from
 * the link that you sent them to,
 * you could name it to whatever you want
*/
?>
[/php]

Or actually, you don't even need to use variables or PHP.
Just use a refresh meta tag in your header.
Something like this.

[code]
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page&lt;/title&gt;
&lt;meta http-equiv=&quote;refresh&quote; content=&quote;3; URL=http://www.domain.com/page.php&quote;&gt;
&lt;/head&gt;
&lt;body&gt;
Please wait while you are being redirected...
&lt;/body&gt;
&lt;/html&gt;
Hope that helps you.