dear every one please check this problem for me...
in my script where should i put on header method
<?php
$SQL_SERVER_USER = "roger";
$SQL_SERVER_PASSWORD = "5089";
$SQL_SERVER_TABLE = "javanull";
$SQL_SERVER_HOST = "localhost";
$SQL_SERVER_PORT ="3306";
$conn = mysql_connect($SQL_SERVER_HOST,$SQL_SERVER_USER,$SQL_SERVER_PASSWORD)
or die("could open database");
//echo("connection ok");
$select = mysql_select_db($SQL_SERVER_TABLE ,$conn)
or die("<p>could find db");
while (1)
{
$conn = mysql_connect($SQL_SERVER_HOST,$SQL_SERVER_USER,$SQL_SERVER_PASSWORD);
if($conn == false)
{
print "connect to SQL server fail..";
mysql_close($conn);
}
else
{
break;
}
sleep (5);
}
$selected = mysql_select_db($SQL_SERVER_TABLE,$conn)
or die("fuck");
$sql = "select * from agent";
$result = mysql_query($sql,$conn);
while ($row = mysql_fetch_object($result)) {
echo ("http://211.21.147.30/sendmessage.php?");
echo ("agentid= 2123");
echo ("&target=");
echo $row->target;
echo ("&message=");
echo urlencode($row->message);
echo ("&deliver_date=");
echo $row->deliver_date;
echo ("&response_url=");
echo $row->response_url;
}//end while
mysql_free_result($result);
// if i put there and then it will come out errors
header("location:$result");
mysql_close($conn);
?>