Jump to content

[SOLVED] including marquee tag on a database output


Recommended Posts

<?php
include("config.php");
$sql="select * from slayer.marquee order by id desc LIMIT 0,10";
$res=mysql_query($sql);
while($row=mysql_fetch_array($res)){
  echo "<marquee><table><tr><td>".$row['name']." ";
  echo "<td>".$row['msg']."</tr></table></marquee>";
}
?>

 

i want the results to be in 1 ligne and one after the other ,thanks ;D ;D

Try

 

<?php
include("config.php");

$sql="select * from slayer.marquee order by id desc LIMIT 0,10";
$res=mysql_query($sql);

echo "<marquee><table><tr>";

while($row=mysql_fetch_array($res)){
  echo '<td>'.$row['name'].' </td>';
  echo '<td>'.$row['msg'].'</td>';
}

echo "</tr></table></marquee>";

?>

  • 6 years later...

help me please, my code is :

 

$table = tov;
$hal = $_GET[hal];
if(!isset($_GET['hal'])){
$page = 1;
} else {
$page = $_GET['hal'];
}
$max_results = 2;

$from = (($page * $max_results) - $max_results);
$sql = mysql_query("SELECT * FROM $table ORDER BY id_berita DESC LIMIT $from, $max_results");
while($hs_show = mysql_fetch_array($sql)){
$urut++;
?>
<marquee scrollamount="4" align="left" behavior="scroll" direction="left" class="text" onmouseover="this.stop()" onmouseout="this.start()">
<?php echo "$hs_show[judul]"; ?>
</marquee>
<?php
}
$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM $table"),0);

$total_pages = ceil($total_results / $max_results);

 

i want the results to be in 1 line and one after the other ,thanks  ;D  ;D 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.