ok well i have come up with some code that comares current date with date in database
but am still getting errors, have pasted the whole page in case its something else thast the problem
<link href="software_style.css" rel="stylesheet" type="text/css">
<?php
include("/Program Files\Apache Group\Apache2\htdocs\m82\software_common.inc");
intrahead("E-tickets.co.uk"); //escapes writing the HTML header code
?>
<?php
$today = date("d/m/y");
echo $today;
?>
<table width="63%" height="493" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF">
<tr align="left" valign="top" bgcolor="#FFFFFF">
<td align="center" bgcolor="#FFFFFF">
<p align="justify"><?php
$categoryID=$POST['categoryID'];
$EventID=$GET['EventID'];
$color[0] = "EFEFEF";
$color[1] = "98AAB1";
mysql_connect("localhost","phpuser"," ") or die ("Database connection error");
mysql_select_db('booking');
$sql = "SELECT * FROM event WHERE categoryID='$categoryID'";
$result = mysql_query($sql);
#while ($row = mysql_fetch_array($result)) {
#echo $row['EventName'] . ',' . $row['Date'] . ',' . $row['Venue'] . "<br>\n";
echo "<table>\n";
echo " <tr>\n";
echo " <th><b>Event Name</b></th>\n";
echo " <th><b>Date</b></th>\n";
echo " <th><b>Venue</b></th>\n";
echo " <th><b>Town</b></th>\n";
echo " <th><b>Availability</b></th>\n";
echo " </tr>\n";
while ($row = mysql_fetch_array($result)) {
$sql1 = "select Total_Seats, Booked_Seats FROM event where EventID =".$row[EventID]."";
$result1 = mysql_query($sql1);
$a = ($a+1)%2;
echo '<tr bgcolor='.$color[$a] . ">\n";
#echo ' <td>'.$row['EventName'].'</td>'."\n";
$sql = "select Expired from events where expired=CURDATE()";
$result = mysql_query($sql);
while ($row1 = mysql_fetch_array($result)) {
if ($row1['Expired']|| $row1['Total_Seats']>=$row1['Booked_Seats']){
echo '<td><a href="tester(1).php?EventName=' . $row['EventName'] .
'">' . $row['EventName'] .'</a></td>';
}
else {
echo '<td>'.$row['EventName'].'</td>';
}
}
echo ' <td>'.$row['Date'].'</td>'."\n";
echo ' <td>'.$row['Venue'].'</td>'."\n";
echo ' <td>'.$row['Town'].'</td>'."\n";
while ($row1 = mysql_fetch_array($result1)) {
$row[Availabilty]
if( $row1['Total_Seats']>=$row1['Booked_Seats']) {
echo "<td align=center><img src=\"image/happy.jpg\" alt=\"This show is available\" width=\"30\" height=\"30\"></td>";
} else {
echo "<td align=center><img src=\"image/sad.jpg\" alt=\"This show is fully booked\" width=\"30\" height=\"30\"></td>";
#echo ' <td>'.$row['Total_Seats'].'</td>'."\n";
}
}
echo ' </tr>'."\n";
}
echo '</table>';
?>
</p>
<p align="justify"> </p>
<p align="justify"> </p>
<p align="center" class="address"><strong>
<strong> </strong> </strong></p>
<p> </p>
<p> </p>
<p align="justify"> </p>
<p align="justify"> </p>
<p align="justify"> </p>
<p align="justify"> </p></td>
</tr>
</table>
<?php
intrafoot(); //escapes writing the HTML footer code
?>
this is my error message
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Program Files\Apache Group\Apache2\htdocs\m82\resultstest.php on line 54
9/05/04 NEC Birmingham
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Program Files\Apache Group\Apache2\htdocs\m82\resultstest.php on line 44