Jump to content

[SOLVED] Can't fimd the header error!!


jwwceo

Recommended Posts

I know header errors are usually caused by outputting before the header command....but I don't have any output...no includes....before the header command. I get an error saying headers already sent on line 6. Any ideas???

 

<?php
error_reporting(E_ALL);
mysql_connect ('localhost','xxxx', 'xx') or die("my sql error");
mysql_select_db ('lxxxxx');

if(isset($_GET[id])){

$shirtid = $_GET[id];
$sql="Select * from shirts Where shirt_id='$shirtid'";
$res=mysql_query($sql);
$rs=mysql_fetch_assoc($res);
$link=$rs[link];
$site_id=$rs[site_id];

if ($site_id == 6){
$newlink = "http://www.tshirthell.com/store/clicks.php?partner=jwwceo&page=".$link;
}
header("Location: $newlink");

}

else {
header("Location: index.php");

}
?>

Link to comment
https://forums.phpfreaks.com/topic/84103-solved-cant-fimd-the-header-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.