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

  • Home
  • SEARCH
  • 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 6902247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:46:29+00:00 2026-05-27T07:46:29+00:00

I have simple html page with php as given below: <!DOCTYPE html PUBLIC -//W3C//DTD

  • 0

I have simple html page with php as given below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Articles 'n' More::Articles</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Articles, Management , english, computers, sharepoint, wp7, bio technology, nano technology, c#">
<meta name="keywords" content="Articles, Management , english, computers, sharepoint, wp7, bio technology, nano technology, c#">
<link rel="stylesheet" type="text/css" href="CSS/Style.css" />
</head>

<body>
<table border="1" width="100%">
<tr id="header" >
                <td height="30%" width="100%" colspan="3">
<?php include("Header.php"); ?>
                </td>
            </tr>
            <tr id="body">
                <td width="15%" valign="top" align="left">
                    <table width="100%" border="3"  align="left">
                        <tr ><td>
<?php include("LeftPanel.php"); ?>
                    </td>
                    </tr>
                    </table>
                </td>
                <td  width="75%" valign="top">
                    <!--Articles-->
                    <?php 
                        $articlePerPage="10";
                        $subcatID = $_GET['subcatid'];
                        $curPageId = $_GET['pageId'];
                        $nextPageId=$curPageId+1;
                        $prevPageId=$curPageId-1;
                        $con=mysql_connect('localhost','root','');
                                if(!$con)
                                {
                                    die('Could not connect: ' . mysql_error());
                                }       

                                mysql_select_db("articles_db",$con);

                                $query="";
                                $queryCount="";

                                if($subcatID == "0")
                                {
                                $queryCount="select count(1) total from tbl_articles";
                                //echo "QueryCount is".$queryCount;
                                }
                                else
                                {
                                $queryCount="select count(1) total from tbl_articles where SUBCATEGORY_ID=".$subcatID;                              
                                }
                                $resultCount= mysql_query($queryCount);
                                $rowCount = mysql_fetch_array($resultCount);
                                $totlaArticles= $rowCount['total'] ;
                                //echo 'total articles'.$totlaArticles;

                                if($subcatID == "0")
                                {
                                    $query="select * from (SELECT ARTICLE_ID,TITLE,CONTENT,POSTED_ON,POSTED_BY FROM TBL_Articles order by POSTED_ON desc limit ".$articlePerPage*$curPageId.") sub order by POSTED_ON asc limit ".$articlePerPage;
                                    //echo $query;
                                }
                                else
                                {
                                    $query="select * from (SELECT ARTICLE_ID,TITLE,CONTENT,POSTED_ON,POSTED_BY FROM TBL_Articles where SUBCATEGORY_ID=".$subcatID."  order by POSTED_ON desc limit ".$articlePerPage*$curPageId.") sub order by POSTED_ON asc limit ".$articlePerPage;
                                }
                                $result = mysql_query($query);
                    ?>

                    <table width="100%">
                        <tr id="repeatingRow" valign="top">
                            <td width="100%">
                            <?php 

                                     $count=0;
                                while($row = mysql_fetch_array($result))
                                  {
                                  $id= $row['ARTICLE_ID'] ;
                                  $title= $row['TITLE'] ;
                                  $content= $row['CONTENT'] ;
$count=$count+1;
                                  if(strlen($content)< 110)
                                        {
                                            $content=substr($content,0,strlen($content));
                                        }
                                        else
                                            {
                                        $content=substr($content,0,100);
                                        }
                                    $postedon=$row['POSTED_ON'] ;
                                    $author = $row['POSTED_BY'] ;

                            ?>

                                <table width="100%">
                                    <tr>
                                        <th width="100%" colspan="3">
            <a href="ShowArticle.php?articleid= <?php echo $id ; ?>&title=<?php echo $title ; ?>"><?php echo $title ; ?></a></th>
                                    </tr>
                                    <tr >
                                    <h6>
                                        <td width="30%" align="left"><img src="Images/account.png" /><?php echo $author ; ?></td>
                                        <td width="30%" align="left"><img src="Images/clock.png" /><?php echo $postedon ; ?></td>
                                        <td width="40%" align="left"><img src="Images/folder.png" />General</td>
                                        </h6>
                                    </tr>
                                    <tr>
                                        <td width="100%" colspan="3"><br/><?php echo $content ;?><br />
                                        <hr  color="#49a6e1">
                                        </td>
                                    </tr>
                                </table>
                                <?php
                                    }
                                ?>
                                                             </td>
                        </tr>
                        <tr>
                        <td align="center">
                        <b>
                            <?php
                            //echo $subcatID;
                            //echo ("<a href='Articles.php?subcatid=".$subcatID."&pageId=".$prevPageId."'>Previous</a>");
                                if($curPageId>1)
                                {
                                    echo ("<a href='Articles.php?subcatid=".$subcatID."&pageId=".$prevPageId."'>Previous</a>");
                                    //echo ("<a href='Articles.php'>Previous</a>");
                                }
                            ?>
                        </b>
                        </td>
                        <td>
                        <b>
                            <?php
                                if($totlaArticles/($curPageId*10)>1)
                                {
                                    echo ("<a href='Articles.php?subcatid=".$subcatID."&pageId=".$nextPageId."'>Next</a>");
                                    //echo "<a href='Articles.php?subcatid='".echo $subcatID."@pageId= ".$nextPageId.">Next</a>"
                                }
                            ?>
                            </b>
                        </td>
                        </tr>
                    </table>
                </td>
                <td height="65%" width="10%" valign="center">
                    <!--Right panel-->
                </td>
            </tr>
            <tr id="footer" bgcolor="dfdfdf">
                <td height="5%" colspan="3">
            count is :  <?php echo $count;  include("Footer.php"); ?>
      <!-- do not get this part when upload on server -->
                </td>
            </tr>
        </table>
</body>
</html>

This page gives the desired result when i try it on my local machine.
But when i upload it to my host server, i face following problems:

  1. It shows only First 3(no scroll bar on webpage) articles in the article section where as on my local machine it shows all the article with a scroll bar.
  2. Does not include footer.php
  3. does not display the background color set in
  4. I tried to set border for the table but it does not display any border

hosted site on the server

on my local machine i have XAMPP (Basispaket) version 1.7.4 with php 5.3.5 and on server i have Version 5.2.6 (run as CGI application)

Does any one has idea about why i am facing this problm and what could be the possible solution.

  • 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-05-27T07:46:30+00:00Added an answer on May 27, 2026 at 7:46 am

    Finally i figured it out.
    The problem the content stored in database, it contained some code and some xml to be displayed on the web page.
    so i just used these two lines

    <?php 
    $content=htmlentities($content);
    echo "<pre><code>".$content."</code></pre>" 
    ?>
    

    and it worked fine.

    for the background colors i used style and now it working.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple html form. On php page. A simple list is placed
I have a simple HTML form that posts to a PHP page, which will
I have this code: include('./simplehtmldom/simple_html_dom.php'); $url = http://www.turismovenezia.it/Dove-Alloggiare/1322597142.html; $ch = curl_init(); // set URL
I have a simple html page with a div. I am using jQuery to
In a simple html page I have: <SCRIPT> function Clicker(number){ if (number == 1)
So I have simple video tag on HTML 5 page playing OGG video. I
I have a simple HTML Table (10 columns x 500 rows). When the page
I have this html page which is very simple, it contains a text box
I have an HTML page with a simple form. When the user clicks submit,
I have a simple flow: A.html -> B.html -> C.html Now, page B either

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.