Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8648953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:26:19+00:00 2026-06-12T13:26:19+00:00

The firebug points at the end of the code to ‘?>’ and says XML

  • 0

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..

<?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);
     ?>

Here is the code sent to the browser as asked by Quentin,seemingly not different.

  <?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);
      ?>

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); ?>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:26:20+00:00Added an answer on June 12, 2026 at 1:26 pm

    You are serving PHP to the client instead of running it through the PHP interpretor on the server.

    You need to make sure that:

    1. you are accessing the file through a server (and not accessing it from a local file)
    2. the server has PHP installed
    3. the file is recognised by the server as one that should be handled by PHP (this is usually done by giving it a .php file extension)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code which gives me the below output in firebug, so according
Is Firebug lite must needed in Sitecore shell? What is the use of this
This is the code for one of my javascript classes: function Foo(text) { var
Firebug is certainly a wonderful tool for javascript debugging; I use console.log() extensively. I
Firebug is awesome in reporting the relative time when an HTTP request was made
Firebug shows a request which causes a huge delay to http://reboltutorial.com/wp-content/themes/minaflow/none Details below but
Firebug has the ability to log calls to a particular function name. I'm looking
On Firebug, when inspecting an element, is there a way to Auto-complete CSS property
With firebug I found that clicking on the link calls javascript function <a href=#
Can firebug be used to show me which rails template is currently being viewed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.