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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:52:16+00:00 2026-06-17T22:52:16+00:00

I’m trying to get the data from my mySQL database and put them into

  • 0

I’m trying to get the data from my mySQL database and put them into a HTML table.
After searching a lot on the internet, but I coudn’t find code that worked for me.

Currently, I have this code

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body>
    <table>
        <thead>
            <tr>
                <td>Naam</td>
                <td>Gemeente</td>
                <td>Datum</td>
            </tr>
        </thead>
        <tbody>
       <?php
          $db_select = mysql_select_db($dbname,$db);
            if (!db_select) {
                die("Database selection also failed miserably: " . mysql_error());
            }
            mysql_select_db("databaseiheko");
            $results = mysql_query("SELECT NaamFuif, GemeenteFuif, DatumFuif FROM tblfuiven");
            while($row = mysql_fetch_array($results)) {
            ?>
                <tr>
                    <td><?php echo $row['NaamFuif']?></td>
                    <td><?php echo $row['GemeenteFuif']?></td>
                    <td><?php echo &row['DatumFuif']?></td>
                </tr>

            <?php
            }
            ?>   
            </tbody>
            </table>
</body>
</html>

The only thing that I get is the first row of my table (Naam-Gemeente-Datum).
Am I doing something wrong or did I forgot something?

  • 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-17T22:52:17+00:00Added an answer on June 17, 2026 at 10:52 pm

    First of all, the most important thing to keep in mind is:

    You are using deprecated and unsecure code

    The mysql_ functions are strongly discouraged, for various reasons:

    • Are deprecated and will be removed in future versions of PHP,
    • Are insecure leading to possible SQL injections,
    • Lack many features present in more current versions of PHP

    See the linked question for much more in-depth explanations.

    Now, to the code itself:

    You are not using mysql_connect to connect to the server

    You should use mysql_connect to specify the server, the username and the password that will be used to access the data in the database. From your code, it seems that it was supposed to be present, because there’s a $db variable used in the mysql_connect function, but not properly initialized nor used again anywhere else.

    You should use mysql_connect in a way similar to this:

    $db = mysql_connect('localhost', $user, '$password');
    if (!$db) {
        die('Not connected : ' . mysql_error());
    }
    

    (Don’t forget to set your username and password!)

    You are using mysql_select_db twice in a row:

        $db_select = mysql_select_db($dbname,$db);
            if (!db_select) {
                die("Database selection also failed miserably: " . mysql_error());
            }
    

    followed by

    mysql_select_db("databaseiheko");

    1. Note the $dbname and $db variables, you don’t have them on your code, this function won’t work like this.
    2. The second mysql_select_db overwrites the first, but you don’t specify a server connection to be used.

    You should use the first version, but you should use mysql_connect before it.

    You have typos in your code

    • if (!db_select) { should be if (!$db_select) {
    • echo &row['DatumFuif'] should be echo $row['DatumFuif']
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I have a view passing on information from a database: def serve_article(request, id): served_article
I am trying to loop through a bunch of documents I have to put
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I am currently running into a problem where an element is coming back from
I am using jsonparser to parse data and images obtained from json response. When

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.