awesome everything is working!
but can you further explain to me how to get the "mysql_num_rows" command to work?
so that i dont have a big list of 0-1-0's?
here is my current code
<?php
require('sql.php');
if (isset($_POST['submit'])) {
$YEAR = $_POST['YEAR'];
$MONTH = $_POST['MONTH'];
$DAY = $_POST['DAY'];
}
if (isset($submit))
{
$query = "SELECT * FROM tracker WHERE timespan LIKE '".$YEAR."-".$MONTH."-".$DAY."%'";
$res = mysql_query($query) or die("couldn't perform $query");
}
echo "<table border='1'>\n
\t<tr><th>id</th><th>home</th><th>start</th><th>end</th><th>timespan</th></tr>\n";
while($r=mysql_fetch_array($res)) {
echo "
\t<tr>\n
\t\t<td>".$r['id']."</td>\n
\t\t<td>".$r['home']."</td>\n
\t\t<td>".$r['start']."</td>\n
\t\t<td>".$r['end']."</td>\n
\t\t<td>".$r['timespan']."</td>\n
\t</tr>\n\n";
}
echo "
</table>";
?>