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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:28:16+00:00 2026-05-20T18:28:16+00:00

I am trying to display all of the records from a database in phpMyAdmin.

  • 0

I am trying to display all of the records from a database in phpMyAdmin. This database is located on my computer which is currently a server because of the Uniform Server software installed on it recently. I am new to building php and html code. I used the last compete documenet code from this link http://www.siteground.com/tutorials/php-mysql/display_table_data.htm and this is the output on my web page.

<HTML>

<HEAD>

<TITLE> LOG INFORMATION FOR ALL customers </TITLE>

</HEAD>


<BODY>

<H1> LOG INFORMATION FOR ENTIRE DATABASE </H1>

<?php


$database="mobile_app_tracking_log";

mysql_connect(localhost);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM tablename";
$result=mysql_query($query);



mysql_close();
?>

<table border="2" cellspacing="7" cellpadding="7">
<tr>
<th><font face="Arial, Helvetica, sans-serif">Index</font></th>
<th><font face="Arial, Helvetica, sans-serif">Identification Number</font></th>
<th><font face="Arial, Helvetica, sans-serif">Date</font></th>
<th><font face="Arial, Helvetica, sans-serif">Time</font></th>
<th><font face="Arial, Helvetica, sans-serif">Application</font></th>
<th><font face="Arial, Helvetica, sans-serif">Usage</font></th>
<th><font face="Arial, Helvetica, sans-serif">Latitude</font></th>
<th><font face="Arial, Helvetica, sans-serif">Longitude</font></th>
<th><font face="Arial, Helvetica, sans-serif">Address</font></th>
</tr>

<?php
$i=0;
while ($i < $num) {


$f1=mysql_result($result,$i,"Index");
$f2-name=mysql_result($result,$i,"Identification Number");
$f3-name=mysql_result($result,$i,"Date");
$f4-name=mysql_result($result,$i,"Time");
$f5-name=mysql_result($result,$i,"Application");
$f6-name=mysql_result($result,$i,"Usage");
$f7-name=mysql_result($result,$i,"Latitude");
$f8-name=mysql_result($result,$i,"Longitude");
$f9-name=mysql_result($result,$i,"Address");
?>

<tr>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f1; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f2; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f3; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f4; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f5; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f6; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f7; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f8; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f9; ?></font></td>
</tr>


<?php

$i++;
}

?>

Can somebody please tell me why the records from the database aren’t showing? Any help would be much appreciated.

  • 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-20T18:28:17+00:00Added an answer on May 20, 2026 at 6:28 pm

    It looks like you are saving the variable $f2-name however you are echo’ing $f2, same with $f3, $f4 etc.

    If you want to keep your naming schema, you have do do:

    echo $f2-name;
    echo $f3-name;
    // etc
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When trying to display a byte stream from HLDS (Half-Life Dedicated Server) in a
I'm trying to create a SharePoint web part that will display all the users
I am trying to display a list of all files found in the selected
I'm trying to display a series of titles varying from 60 characters to 160
I'm trying to create a SQL 2005 query to retrieve and combine records from
gcc 4.4.4 c89 However, I am having a problem trying to display all the
I am trying to display all the fonts available in the system with its
i am trying to display all the residents on a pdf and their dependents,
I've been trying to display text using a Quartz context, but no matter what
I'm trying to display a loading icon while my iPhone app downloads a network

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.