Welcome to WebmasterWorld Guest from 54.144.79.200

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP & javascript problem

Help Me, PHP, javascript

     

cooldgjk

4:17 pm on Nov 29, 2002 (gmt 0)

10+ Year Member



<?php
include("config.php");
if ($_GET["sort"])
{
echo "";
$sort=$_GET["sort"];
mysql_pconnect($dbhost,$dbuser,$dbpassword) or die ("error connect db server");
mysql_select_db($dbname) or die ("error open db");
$query_cmd="select * from as_zhanzhang where sort='$sort' order by id desc limit 0,15";
$result=mysql_query($query_cmd) or die ("error query db");
while ($row=mysql_fetch_array($result))
{
echo "document.write('<font face=Wingdings color=#660033> Y </font><a href=\\\"#888\\\" onClick=javascript:window.open(\"http://www.somesite.net/zhanzhang/show.php?id=$row[id]\",new Date().getTime(),\"toolbar=1,location=0,status=0,menubar=1, width=730,height=500,scrollbars=1,resizable=1\");>$row[title]</a> <font color=#848284><$row[uptime]></font><br>');";
}
mysql_close();
}
else
echo "document.write(\"             <a href=http://www.somesite.net/zhanzhang/index.php target=_blank>[Free News Code]/a>\");";

?>

in,html.
I want use:
<script src=http://www.example.com/folder/news.php?sort=3></script>

But,

This page is error.

can you help me?

[edited by: jatar_k at 6:24 pm (utc) on Nov. 29, 2002]
[edit reason] edited url / thanks! - fixed sidescroll [/edit]

jatar_k

6:37 pm on Nov 29, 2002 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com] cooldgjk

What is the error you are getting or what is it doing that it should not be doing?