Jump to content

Archived

This topic is now archived and is closed to further replies.

ari_aaron

Redirecting

Recommended Posts

How can I make a page execute some code, and then go to another page?

Share this post


Link to post
Share on other sites
Just to be on the safeside, ill add 2 lines of code to high - tek's post.

[code]
<?php
ob_start();

$var=1;
$vat++;

header("Location: index.php");
ob_end_flush();
?>
[/code]

Share this post


Link to post
Share on other sites
your ob_flush(); will not execute once your code reaches header("Location: index.php"); the page will forward you to the index.php page so if you want the ob_flush() to work move it above the header code

Share this post


Link to post
Share on other sites
There is no reason for you to use ob_start(); for what high-tek has posted!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.