i have used redirect------header("Location example.php");


but getting an error
the error is----cannot modify headers. headers already used

there is no html in the page...
but the current page("example.php") is a redirected one

it worked fine for me in my local wamp server...

but when hosted it says this error...

help me! :-(

Put this in top of the page where you have the header redirect part.

ob_start();

ob_start() This function will turn output buffering on. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.