If php header redirect doesn't work and you have Warning as this:
Warning: Cannot modify header information - headers already sent by (output started at /..) in /...php on line 8
header('Location: http://www.example.com/');
exit;
Add ob_start(); after opening <?php tag
Use as:
<?php
ob_start();
// ... some script..
header("Location: http://www.example.com/");
ob_end_flush();
exit;
?>
ob_start — Turn on output buffering
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.
The contents of this internal buffer may be copied into a string variable using ob_get_contents(). To output what is stored in the internal buffer, use ob_end_flush(). Alternatively, ob_end_clean() will silently discard the buffer contents.
Previous page: HTML input Tag
Next page: The Basics of PHP Objects