Topic: "PHP sessids" (page 1 of 1)

1
Author Post
sniperkid
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
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 ?

private message Website
Erik
groupmastergroupmastergroupmastergroupmastergroupmaster
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
private message EMail Website
sniperkid
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
oh yea :stegano:, i think ill blame it on the drink :drink: LOL. Thanks.

private message Website

Topic: "PHP sessids" (page 1 of 1)

1