I know this may sound crazy but I need these two line to opne in new windows:
1- location.href='$row->website_url';
2- location.href='$url';
If any one could help I would be very grateful.
thanks in advance,
Andrew Billits
here is the entire script if that would help:
<?
include("../connection.php");
$sql="select * from tbl_keywords where keywords like'%$search%' and status=1";
$result=mysql_query($sql,$connection) or die (mysql_error());
$val=mysql_num_rows($result);
if($val==0)
{
$errmsg=urlencode("Keyword not in DataBase...");
echo"
<head>
<title>Keywords:: </title>
<Script Language='JavaScript'>
location.href='search.php?errmsg=$errmsg';
</Script>
</head>
<body>
</body>
";
//header("Location: search.php?errmsg=$errmsg");
exit(0);
}
if($val==1)
{
$row=mysql_fetch_array($result);
$url=$row["website_url"];
echo"
<head>
<title>Keywords:: </title>
<Script Language='JavaScript'>
location.href='$url';
</Script>
</head>
<body>
</body>
";
//header("Location: $url");
exit(4);
}
else
{
srand ((double) microtime() * 1000000);
$randval = rand(0,$val-1);
mysql_data_seek ($result, $randval);
$row = mysql_fetch_object ($result);
echo"
<head>
<title>Keywords:: </title>
<Script Language='JavaScript'>
location.href='$row->website_url';
</Script>
</head>
<body>
</body>
";
// header("Location: $row->website_url");
exit(3);
}