| Author | Post | |||
|
sniperkid |
Hi, just a little question, is it possible to get a popup then send the person to a place (in php). This is my current code but it outputs: Warning: Cannot modify header information - headers already sent by (output started at ...... my code
<?
if ($check1!= $check2){
?>
<script>alert("Error");</script>
<?
header("Location: back.php");
}
any solution to this problem ? |
|||
|
|
|
|||
|
Erik |
Hi, the problem is as it says - once you sent any content, no headers can be send. Even if you would use buffering, it wouldn't help you. When you send this Location-header, the content of the page is of no interest at all. But you can just use JavaScript to perform the redirect (location.href="back.php"). Cu, Erik |
|||
Edited by Erik on 21.07.2006 04:28:51 | ||||
|
|
|
|||
|
sniperkid |
oh yea |
|||
|
|
|
|||