Jump to content

tbody autoscroll within php


mbh23

Recommended Posts

I am trying to get the auto scroll on the <tbody> but it isnt working here is what i have so far

 

<html>
<head>
<style type="text/css">
thead {color:green}
tbody {color:blue;height:50px}
</style>

</head>
<body>

<table border="1">
  <thead>
    <tr>
      <th>ID</th>
      <th>Part</th>
    </tr>
  </thead>
<?php
$query="select * from something ";
	$result = mysql_query($query) or die(mysql_error());

while($row = mysql_fetch_array($result)){

echo" <tbody style="height: 100px; overflow: auto;">" ;
	echo"<tr>"
     ."\n  <td >{$row[division]}</td>"
     ."\n  <td >{$row[partno]}</td>" ;
  echo"  </tr>";
   }
?> 
</tbody>

</table>

</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/173684-tbody-autoscroll-within-php/
Share on other sites

Archived

This topic is now archived and is 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.