Op m'm forum heb ik een tabel gemaakt en daarin wil ik horizontaal de laatste onderwerpen laten scrollen. Het scrollen zelf werkt maar hij haalt niets uit de databse, deze tekst komt voorbij:
Ik heb al vele variabelen geprobeerd in dit script maar telkens met hetzelfde resultaat. Ziet iemand anders wel wat er niet klopt?
$title
By $user on $time"; } ?>
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| <marquee> <?php $url = "/forum"; // If url is - yourforums.com/forums , then enter in "/forums" $ppath = "var/www/html/forum/config.php"; // Physical path to the config.php file, edit this for your own site. if(empty($count)) $count = "10"; // How many topics to link to include_once("$ppath"); $db = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("here we die at connection"); @mysql_select_db("$dbname",$db) or die("here we die"); $prefix = "phpbb"; $query="SELECT t.*, p.*, u.* FROM " . $prefix . "_topics t, " . $prefix . "_posts p, " . $prefix . " u WHERE t.topic_first_post_id = p.post_id AND p.poster_id = u.user_id ORDER BY `topic_id` DESC LIMIT 0, $count"; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { $topicid = "$row[topic_id]"; $title = "$row[topic_title]"; $forumid = "$row[forum_id]"; $user = "$row[username]"; $user_id = "$row[user_id]"; $time = date("D d M Y G:i","$row[post_time]); echo "<span class=\"forumlink\"><a title=\"$title\" href=\"$url/viewtopic.php?t=$topicid&sid=$forumid\" class=\"mainmenu\">$title</a><br />By <a href=\"$url/profile.php?mode=viewprofile&u=$user_id\" class=\"forumlink\">$user</a> on $time</span>"; } ?> </marquee> |
Ik heb al vele variabelen geprobeerd in dit script maar telkens met hetzelfde resultaat. Ziet iemand anders wel wat er niet klopt?
[ Voor 15% gewijzigd door NMe op 15-04-2005 18:48 . Reden: Syntax highlighting toegevoegd ]