We help IT Professionals succeed at work.

add scroll bar to table

llantwit
llantwit asked
on
4,444 Views
Last Modified: 2012-06-21
I am trying to add a scroll bar to the table but keep hiting errors:-

<html>

<head>
<title>Month Summary</title>
<!-- change styles if you want -->

<style type="text/css">
A:link {text-decoration: none; color: black;}
A:visited {text-decoration: none; color: black;}
A:active {text-decoration: none; color: black;}
A:hover {text-decoration: underline; color: red;}
p {font-family: georgia, verdana, sans-serif; font-size: 13px; color: #333333; }
h1 {font-family: georgia, verdana, sans-serif; font-size: 16px; color: #660000; }
body {background-color: #fcfcfc;}
</style>

</head>


<body>


<?php

// THERE IS NO NEED TO EDIT BELOW HERE

$mon = date("m",mktime()); // month from clicked month name
$month = intval($mon); // var to use with month name array
if (strlen($mon)==1) { $mon = "0". $mon; }
$yr = date("Y",mktime()); // year from clicked month name

include("cal_parms.php");
include("./lang/dat_nam_en.php"); // load default language file so as not to mess anything upp with new text.
include($dat_names); // retrieved from cal_parms.php as a 'language' file
include("cal_db_conn.php");
mysql_connect($db_host, $db_login, $db_pass) or die ("Can't connect!");
mysql_select_db($db_name) or die ("Can't open database!");

$min_dat = $yr. "-". $mon. "-01";
$max_dat = $yr. "-". $mon. "-31"; //sloppy but effective

// retrieve all events for the month

error_reporting(0);

$query = "SELECT * from $db_table WHERE date_format(ev_dat, '%Y-%m')='$yr-$mon' ORDER by ev_dat";
$result = @mysql_db_query($db_name, $query);



echo "<table width='350' height='250' cellpadding='3' cellspacing='3' align='left' style='border: thin dotted #999999;' bgcolor='#bfffd4'><tr><td>";
<td><div id="tablescroll">




while ($myrow = mysql_fetch_array($result)) // loop through all results
{
    $found = $myrow['ev_dat'];
    $pieces = explode("-", $found);
    $monum = intval($pieces[1]);
    $danum = intval($pieces[2]);
   
    echo "<h1>". $danum. " ". $mo[$month]. ", ". $yr. "</h1>";
    echo "<p><strong>". $EventText. ":&nbsp;</strong>". $myrow['ev_title']. "<br/>";
    echo "<strong>". $LocationText. ": &nbsp;</strong>". $myrow['ev_locn']. "<br/>";
    echo "<strong>".$DetailsText. ": &nbsp;</strong>". nl2br($myrow['ev_desc']). "</p>";
   
    $i++;
}
if ($i==0) { echo "<h1>".$noEventsText." ". $mo[$month]. "</h1>"; }
if ($sho == "1") {
    echo "";
}
else {
    echo "";
}
?>
</td></tr></td></div></table>
</html>
</body>
Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.