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 8846849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:05:56+00:00 2026-06-14T12:05:56+00:00

I am using the following code to fetch data from a database table: <!DOCTYPE

  • 0

I am using the following code to fetch data from a database table:

<!DOCTYPE HTML>
<html>
    <head>
        <title>Search data</title>
    </head>
    <body>
        <table>
            <tr>
                <td align="center">EMPLOYEES DATA</td>
            </tr>
            <tr>
        <td>
        <table border="1">
            <tr>
            <td>NAME</td>
            <td>EMPLOYEES<br>NUMBER</td>
            <td>ADDRESS</td>
            </tr>
    <?php
        //the example of searching data with the sequence based on the field name
        //search.php
        mysql_connect("localhost","root","");//database connection
        mysql_select_db("db_psu_online");

        $order = "SELECT * FROM tb_income_statement_igp_fields";
        //order to search data
        //declare in the order variable

        $result = mysql_query($order);  
        //order executes the result is saved
        //in the variable of $result

        while($data = mysql_fetch_row($result)){
            echo("<tr><td>$data[1]</td><td>$data[0]</td><td>$data[2]</td></tr>");
        }
    ?>
        </table>
        </td>
        </tr>
        </table>
    </body>
</html>

The output of the code above is this:
enter image description here

I don’t know why the characters: "); } ?> are being printed.

  • 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-14T12:05:57+00:00Added an answer on June 14, 2026 at 12:05 pm

    Are you saving the file with the extension .php? Is PHP installed and enabled on your server?

    The answer to at least one of these is “no”, because what you are seeing is the raw PHP output in the HTML – if you use the browser’s View Source, you’d see that clearly.

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

Sidebar

Related Questions

I am using following code to fetch hierarchical data from Web SQL Database: ...
I'm using the following code to fetch data out of my Core Data graph:
I am using the following code to fetch html source website. private string Extract_Source(string
I using following code: var search = 'test'; if ($('#sku').find(search) ){ //alert(search); $(document).find(search).css('color','red'); <TABLE>
I'm using this php to fetch data from my mysql database: $wpdb->get_var(select count(*) from
Using the following code: <table border=1 > <? $item_count=0; $select_SQL=select * from iplay_test; $result=mysql_query($select_SQL,$con);
I am using following code to get bitmap from url. This function is used
My table is being populated using ajax from a mysql database. I have a
I want to fetch some data from mySQL without refreshing the page using jQuery.
I have written php code to retrieve data from database to div in webpage.i

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.