if you visit here http://www.joomusic.info/joosilver.php you can understand my concept. i have set all script and calender and i make table in the mysql database table name is Firstname and there are 2 columns in this table 1, Drawtime and 2, winningnumbers. and i have made connect.php file for connected the databse
this is half script because i dont no how i make it full
<script language="JavaScript" type="text/javascript" src="calendar/calendar.js"></script>
<!--<strong><div align="right" id="timeval" style="color:#FF6600; font-family:Arial, Helvetica, sans-serif">--:--:--</div></strong>-->
<table width="420" border="1" >
<form name="showdraw" action="ooo.php" method="post">
<tr bgcolor="#FF6600">
<td><script> DateInput('cdate', true, 'YYYY-MM-DD'); </script></td>
<td> <input type="submit" value ="Show"> <input type="hidden" value="Show" name="action"> </td>
</tr>
<tr bgcolor="#FF6600">
<td><h2>Draw Time</h2></td>
<td><h2>Wining Number</h2></td>
</tr>
</form>
<?php
include('connect.php');
now after this include('connect.php); which php script i add in this page then my script work like this http://joomusic.info/joosilver.php
Okay, well there's actually a lot to do to get it to work, but I'm going to concentrate on getting the results from the database. Basically, just pull the date value from the post string (I do not know what you named it, so I called it date
). Then, pass that to your database and loop through the results. Finally format the date to just show the hours and minutes and then stick it into a table.
// GET THE DATE FROM THE FORM
// I DON'T KNOW WHAT THE NAME OF YOUR DATE FIELD IS, BUT CHANGE IT IN $_POST['FIELD NAME']
$draw_date = date("Y-m-d", strtotime($_POST['date']));
// CONNECT TO THE DATABASE - THIS SHOULD BE SET ALREADY IN YOUR connect.php
$link = mysqli_connect('DATABASE HOST', 'USERNAME', 'PASSWORD', 'DATABASE');
// BUILD OUT THE QUERY TO GET ALL RECORDS WITH THE SAME DRAW DATE AND ORDER THEM BY TIME
$query = "SELECT Drawtime, winningnumbers FROM Firstname WHERE Drawtime = '".$draw_date."' ORDER BY Drawtime";
// EXECUTE THE QUERY
$result = mysqli_query($link, $query) or die("Cannot Get Winning Numbers");
// START PRINTING OUT THE TABLE
print "
<table>";
// LOOP THROUGH EACH OF THE RESULTS FROM THE DATABASE AND PRINT THEM OUT
while ($row = mysqli_fetch_array($result)) {
// FORMAT THE DATE SO IT IS ONLY SHOWING THE TIME
print "
<tr>
<td>".date("H:i", strtotime($row['Drawtime']))."</td>
<td>".$row['winningnumbers']."</td>
</tr>";
}
// CLOSE UP YOUR TABLE
print "
</table>";