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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:53:16+00:00 2026-06-11T16:53:16+00:00

I can’t remember on how to do this. I am trying to take all

  • 0

I can’t remember on how to do this. I am trying to take all the entries from a table within a database an list it into an html table. I am also trying to limit the number of entries pulled from the table to only 10 to 20.

//Connection Info
include('data.php');

//Query To Pull Data
$sql = mysql_query("select name, death, model, humanity, hkills, bkills, kills, hs, late, ldrank, stime, survival, lastupdate from $stats order by kills limit 10");

//Data Pulled To Be Displayed
while ($row = mysql_fetch_array($sql)) {
    //Username
    $name = $row['name'];
    //Deaths
    $death = $row['death'];
    //Amount of Humanity
    $humanity = $row['humanity'];
    //Player Type
    $model = $row['model'];
    //Murders
    $murder = $row['hkills'];
    //Bandit Kills
    $bandit = $row['bkills'];
    //Zombie Kills
    $zombie = $row['kills'];
    //Head Shots
    $head = $row['hs'];
    //Unknown
    $late = $row['late'];
    //Unknown
    $ldrank = $row['ldrank'];
    //Unknown
    $stime = $row['stime'];
    //Time Survived
    $survival = $row['survival'];
    //Last Time Player Was On
    $update = $row['lastupdate'];
}


?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="1000" border="1">
  <tr>
    <th scope="col">Username</th>
    <th scope="col">Type</th>
    <th scope="col">Friendliness</th>
    <th scope="col">Deaths</th>
    <th scope="col">Murders</th>
    <th scope="col">Bandit Kills</th>
    <th scope="col">Zombie Kills</th>
    <th scope="col">Head Shots</th>
    <th scope="col">Late</th>
    <th scope="col">STime</th>
    <th scope="col">Time Survived</th>
    <th scope="col">LDRank</th>
    <th scope="col">Last Played</th>
  </tr>
  <tr>
    <td><? echo "$name"; ?></td>
    <td><? echo "$model"; ?></td>
    <td><? echo "$humanity"; ?></td>
    <td><? echo "$death"; ?></td>
    <td><? echo "$murder"; ?></td>
    <td><? echo "$bandit"; ?></td>
    <td><? echo "$zombie"; ?></td>
    <td><? echo "$head"; ?></td>
    <td><? echo "$late"; ?></td>
    <td><? echo "$ldrank"; ?></td>
    <td><? echo "$stime"; ?></td>
    <td><? echo "$survival"; ?></td>
    <td><? echo "$update"; ?></td>
  </tr>
</table>

</body>
</html>
  • 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-11T16:53:17+00:00Added an answer on June 11, 2026 at 4:53 pm

    it should be like this

        <table width="1000" border="1">
          <tr>
            <th scope="col">Username</th>
            <th scope="col">Type</th>
            <th scope="col">Friendliness</th>
            <th scope="col">Deaths</th>
            <th scope="col">Murders</th>
            <th scope="col">Bandit Kills</th>
            <th scope="col">Zombie Kills</th>
            <th scope="col">Head Shots</th>
            <th scope="col">Late</th>
            <th scope="col">STime</th>
            <th scope="col">Time Survived</th>
            <th scope="col">LDRank</th>
            <th scope="col">Last Played</th>
          </tr>
    
        <?php
        while ($row = mysql_fetch_array($sql)) { ?>
        <tr>
            <td><?php echo $row['name']; ?></td>
            // Rest of other values
        <tr>
       <?php } //End while?>
        </table>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how can I replace this 2 symbol below from the string
Can anyone help me trying to find out why this doesn't work. The brushes
Can someone please shed some light into echoing html when it contains php functions?
Can I order my users in the database, so I don't have to say
Can anyone explain to me why this program: for(float i = -1; i <
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Can I run this in a Windows command prompt like I can run it
Can anybody help me? What should be the datatype for this type -07:00:00 of
can someone explain why the compiler accepts only this code template<typename L, size_t offset,
Can't figure out how to do this in a pretty way : I have

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.