Why am I getting the error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/content/b/i/k/mydirectory/html/ax0!calRe367/view.php on line 13
but it still shows me the data underneath it
VB Code:
<?php include("cn.php"); include("commonview.php"); checklogin(); $sql = "SELECT * FROM calendar"; $calendar = mysql_query($sql) or die(mysql_error()); echo '<table> <tr>'; while ($calendar = mysql_fetch_array($calendar)) { if ($i == 2) { echo '</tr><tr>'; $i = 0; } echo '<td><b>' . $calendar['dept'] . '</b><br>'; echo $calendar['mon'] . '<br>'; echo $calendar['tues'] . '<br>'; echo $calendar['wed'] . '<br>'; echo $calendar['thurs'] . '<br>'; echo $calendar['fri'] . '<br>'; echo $calendar['sat'] . '<br>'; echo $calendar['sun'] . '<br><br></td>'; $i++; } echo '</tr></table><br>'; ?>




Reply With Quote