immiseejamn
New Member
The firebug points at the end of the code to '?>' and says XML cant be the whole program,I searched enough about this error but all talk about js & ajax.But my code has only html and i can't find any error here..\[code\]<?php $con = mysql_connect('localhost','root','*****'); if (!$con) { die("OOPS!Could not connect to server".mysql_error()); } mysql_select_db('EVENTS',$con) or die('Could not connect'.mysql_error()); echo "<table>"; echo "<tr>"; echo "<td>"."Time"."</td>" ; $i=0; $j=0; while($i < 7) { $today = mktime(0,0,0,date('d')+i,date('m'),date('Y')); echo "<td>".date('d/m/Y' , $today)."<br />".date('D',$today)." </td>"; i++; } echo "</tr>"; while ($j < 10) { $i= 0 ; $time = 8+ $j; echo "<tr>" while ( $i < 7) { $today = mktime(0,0,0,date('d')+i,date('m'),date('Y')); $row1 = mysql_query ("SELECT DESCRIPTION FROM EVENTS WHERE TIME='$time' AND DATE='$today'") or die() ; $row2 = mysql_query ("SELECT NAME FROM EVENTS WHERE TIME='$time' AND DATE='$today'") or die() ; $result1 = mysql_result($row1,$con) or "---"; $result2 = mysql_result($row2,$con) or "-"; echo "<td>".$result1."BY".$result2."</td>" ; i++; } echo"</tr>"; j++; } echo "</table>"; mysql_close($con); ?>\[/code\]Here is the code sent to the browser as asked by Quentin,seemingly not different.\[code\] <?php $con = mysql_connect('localhost','root','*****');if (!$con) { die("OOPS!Could not connect to server".mysql_error()); }mysql_select_db('EVENTS',$con) or die('Could not connect'.mysql_error()); echo "<table>"; echo "<tr>"; echo "<td>"."Time"."</td>" ; $i=0; $j=0; while($i < 7) { $today = mktime(0,0,0,date('d')+i,date('m'),date('Y')); echo "<td>".date('d/m/Y' , $today)."<br />".date('D',$today)." </td>"; i++; } echo "</tr>"; while ($j < 10) { $i= 0 ; $time = 8+ $j; echo "<tr>" while ( $i < 7) { $today = mktime(0,0,0,date('d')+i,date('m'),date('Y')); $row1 = mysql_query ("SELECT DESCRIPTION FROM EVENTS WHERE TIME='$time' AND DATE='$today'") or die() ; $row2 = mysql_query ("SELECT NAME FROM EVENTS WHERE TIME='$time' AND DATE='$today'") or die() ; $result1 = mysql_result($row1,$con) or "---"; $result2 = mysql_result($row2,$con) or "-"; echo "<td>".$result1."BY".$result2."</td>" ; i++; } echo"</tr>"; j++; } echo "</table>"; mysql_close($con); ?>\[/code\]The .html page when opened in browser shows this:"; echo ""; echo ""."Time"."" ; $i=0; $j=0; while($i < 7) { $today = mktime(0,0,0,date('d')+i,date('m'),date('Y')); echo "".date('d/m/Y' , $today)."".date('D',$today)." "; i++; } echo ""; while ($j < 10) { $i= 0 ; $time = 8+ $j; echo "" while ( $i < 7) { $today = mktime(0,0,0,date('d')+i,date('m'),date('Y')); $row1 = mysql_query ("SELECT DESCRIPTION FROM EVENTS WHERE TIME='$time' AND DATE='$today'") or die() ; $row2 = mysql_query ("SELECT NAME FROM EVENTS WHERE TIME='$time' AND DATE='$today'") or die() ; $result1 = mysql_result($row1,$con) or "---"; $result2 = mysql_result($row2,$con) or "-"; echo "".$result1."BY".$result2."" ; i++; } echo""; j++; } echo ""; mysql_close($con); ?>