Welcome to WebmasterWorld Guest from 23.22.220.37

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)

Inactive Member
Account Expired

 
 


<?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]

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

Administrator

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

joined:July 24, 2001
posts:15755
votes: 0


Welcome to WebmasterWorld [webmasterworld.com] cooldgjk

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

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members