View Full Version : Scrolling marquee
omarson
04-10-2007, 02:09 PM
Hello forum,
I need to display the contents of a table in a scrolling marquee? is this possible?
to better explain myself; if I have a table called news, in this table I will put some news, I then need to display these news or some of it in the index page in the form of a scrolling news bar.
I hope I have explained my self correctly
Your help is appreciated
Kayla
04-10-2007, 07:47 PM
So you want to display a scrolling marquee using database table news from a field that contains todays news right?
Where would this scrolling marquee be displayed. :confused:
I guess this is more php/html_javascript coding then customization.
omarson
04-11-2007, 08:43 AM
thanks kayla for ur reply :)
I need to display the scrolling maquee in the main page of the web site.
Is this possible.
Your help is appreciated
omarson
04-11-2007, 10:02 AM
Hello Kayla,
sorry for bothering you.
I have used the following code to display records in the marquee:
<?php
$conn=@mysql_connect("localhost","user","password")
or die("Database error");
$db=@mysql_select_db("db_name", $conn)
or die("Database error");
$sql="select * from news";
$rs=@mysql_query($sql, $conn);
$table=@mysql_fetch_array($rs);
?>
<marquee><?php echo $table['news']; ?></marquee>
This worked fine but the problem is that it only display the first record in the table.
Can u advice me how to display the complete records in the table; say if there are 10 records, how can they all be displayed in the marquee?
Thanks in advance
vBulletin® v3.7.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.