homepage Welcome to WebmasterWorld Guest from 54.237.213.31
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP & javascript problem
Help Me, PHP, javascript
cooldgjk

10+ Year Member



 
Msg#: 1029 posted 4:17 pm on Nov 29, 2002 (gmt 0)

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

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



 
Msg#: 1029 posted 6:37 pm on Nov 29, 2002 (gmt 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?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved