/    Sign up×
Community /Pin to ProfileBookmark

need advice from u guys..!!!

hello every one ,,,, thanks for the help that u guys did before .. but here anain i’m stuck with new idea…… i need some help from u guy … i have written a script to display data from sql table which is working perfectly fine and my new idea is to put a scroll bar so that it look good and the data wont overflow to down …. can any one check the code and tell whether i can do or not …and is there any way of doing it …. i really want to impress my boss…

here is the code-

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd“>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>

<body>
<form action=”” method=”post” >
<p>&nbsp; </p>
<table bgcolor=”#313131″ width=”620″cellpadding=”30″ cellspacing=”0″ border=”0″ height=”” align=”center”>
<tr>
<td align=”left” colspan=”2″>
<font color=”#FFFFFF” size=”6″> Enter Date:</font>
<input type=”text” name=”eventdate” size=”10″/><font color=”#FFFFFF” size=”3″>*Date Format MM/DD/YYYY*</font>
</td></tr>
<tr>
<td align=”right”><input name=”submit” style=”font-size:12pt “type=”submit” value=”submit”/>
</td></tr>
</table>
</form>
<?php
include(“connect.php”);
include(“userinfo.php”);

if($_POST[‘submit’]==”submit”) {

$query =”SELECT * FROM event_list where eventdate= ‘$eventdate'”;
$result = mysql_query($query) or die (“Couldn’t query data” . mysql_error());

$eventdate = mysql_real_escape_string($_POST[‘eventdate’]);
$event = mysql_real_escape_string($_
POST[‘event’]);

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

echo “<tr>”;
echo “<td>” . $row[‘Room_No’] . “</td>”;
echo “<td>” . $row[‘eventdate’] . “</td>”;
echo “<td>” . $row[‘event’] . “</td>”;
echo “</tr>”;
}
}
echo “</table>”;
?>

</table>
</body>
</html>

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@rlhawkSep 15.2008 — It [I]should[/I] automatically create a scroll bar for you from what I know. The only problem I see with your code (and maybe you have it, just forgot to paste all of it) is that you don't have a beginning for your data table. You should add a 'echo "<table>";' before your while loop starts. If, for some reason, it still isn't showing everything, you might try adding a 'style="overflow: scroll;"' to that table.
×

Success!

Help @Andylonger spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...