Redirecting with php

bramil5

New Member
Messages
8
Reaction score
0
Points
0
Make sure that you put the code in the very top op you page.
Nothing that creates ouput such as the echo or print function, or html can be above it.

PHP:
<?php
header("Location: http://yoursite.com");
?>

Code should be pretty self explanatory.

Hope this helps.
 

supajason

Member
Messages
288
Reaction score
2
Points
18
the best thing to do is to use "ob_start()" at the top of the page, by using this it does send anything to the browser until you use "ob_end_flush()" this way you can echo things and if you want you can change the header.
 
Top