Warning: Cannot modify header information - headers already sent by (output started at /nfs/c05/h04/mnt/79255/domains/wixyy.com/html/includes/functions.php:1) in /nfs/c05/h04/mnt/79255/domains/wixyy.com/html/includes/functions.php on line 45
I've checked everything and can't find anything wrong. I took out the additions I made to the code and uploaded but was still faced with the same problem.
In my index.php file at the beginning I have:
- Code: Select all
<?php
require 'includes/config.php';
require 'includes/functions.php';
if(isset($_GET['goto'])){
$short=$_GET['goto'];
gotoURL($short);
}
?>
And the gotoURL function looks like:
- Code: Select all
//Goes to shortened URL
function gotoURL($short){
$sql="SELECT link FROM shorten WHERE short='$short'";
$result=mysql_query($sql);
if(mysql_num_rows($result)==0){
header('Location:?noexist');
}else{
while($row=mysql_fetch_array($result)){
$url=$row['link'];
header('Location:$url');
}
}
}
Has anyone any idea at all why this is happening? Was working perfectly before.
Thanks
J.Barrett

