hey all i need some help in redirecting my page. following is my code. here is the scenario:
when the user enters the admin panel from another website set up on a different host/server (a cms actually) the user is redirected to this page and the data from the main website(the control center of the cms system hosted on a different server, the query is made and the data is extracted. then the user is supposed to be redirected back to the admin panel and the data extracted is supposed to displayed on that admin panel.
now the problem that i am having is that this script is not redirecting at all. i have no idea why the script is not being redirected. the header is not working. thanx in advance.
<?php
session_start();
include 'config.php';
$getnews="SELECT *
FROM developmentnews
WHERE project_name='Theeta CMS' AND display=1
";
$querygetnews=mysql_query($getnews) or die(mysql_error());
$ifnewsexists=mysql_num_rows($querygetnews);
if($ifnewsexists!=0)
{
$newsitem=mysql_fetch_array($querygetnews);
extract($newsitem);
$latestversion=$version;
$news=$content;
$go=$_SERVER['SERVER_NAME']."/admin/index.php";
$go=$go."?recievednews=1&news=".$news."&version=".$latestversion;
header("Location: $go");
exit(0);
}//end if
else
{
$go=$_SERVER['SERVER_NAME']."/admin/index.php";
$go=$go."?recievednews=1";
header("Location: $go ");
exit(0);
}//end else
?>