Pull database info and display to html problem?

Pull database info and display to html problem?

I'm trying to display the information from the database to the html page but it is only displaying the message "connected successfully". The name of the database is "admin" and the table within that database is called "users". I have no idea how to get past the message and just display the table I have created.

I'm trying to display the information from the database to the html page but it is only displaying the message "connected successfully". The name of the database is "admin" and the table within that database is called "users". I have no idea how to get past the message and just display the table I have created.

Index page (index.php):

<?php
include_once('connection.php');
$query="select * from users";
$result=mysql_query($query);
?>
<!DOCTYPE html>
<html>
<title>
    <head> Fetch Data Frome Database</head>
</title>
<body>

<table align="center" border="1px" style="width:250px; line-height: 30px;"> <tr> <th colspan="4"><h2>Account Record</h2></th> </tr> <t> <th>ID</th> <th>Username</th> <th>Password</th> </t>

&lt;?php

while($rows=mysql_fetch_assoc($result))
{
?&gt;

&lt;tr&gt;
    &lt;td&gt;&lt;?php echo $rows['ID'];?&gt;&lt;/td&gt;
    &lt;td&gt;&lt;?php echo $rows['username'];?&gt;&lt;/td&gt;
    &lt;td&gt;&lt;?php echo $rows['password'];?&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;?php
}

?&gt;

</table>

</body> </html>

CONNECTION PAGE (connection.php):

<?php
//Include your own values for username, password and     dbase name

$host = "localhost"; $username = "root"; $password = "root"; $dbname = "admin";

// Create connection $conn = new mysqli($host, $username, $password, $dbname);

// Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } echo "Connected successfully"; ?>


php html mysql database

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Best MySQL DigitalOcean Performance – ScaleGrid vs. DigitalOcean Managed Databases

Compare ScaleGrid MySQL vs. DigitalOcean Managed Databases - See which offers the best MySQL throughput, latency, and pricing on DigitalOcean across workloads.

How to Store Form Data in Database using PHP -2020

in PHP Insert Data Into MySQL Database From Form. Here you will learn how you can insert or store or save form data into mysql database table using PHP code

PHP Code for Update Data in MySQL Database - Tuts Make

PHP code for updating data in mysql database. Here we'll show you how to fetch and update form data into mysql database using PHP code. &demo

Country State City Dropdown list in PHP MySQL PHP

Country state city dropdown using ajax in php. You'll learn how to populate country city state dropdown based on previous selection in php using ajax

Login Page in PHP with Database Source Code

Simple login form in PHP using session. Here you'll learn how to create complete login form and authenticate users from MySQL database in PHP.