First Need to Create Database:
Create database db_record;
CREATE TABLE `record` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`first_name` VARCHAR(50) NULL DEFAULT NULL,
`last_name` VARCHAR(50) NULL DEFAULT NULL,
`email` VARCHAR(50) NULL DEFAULT NULL,
`password` text NULL DEFAULT NULL,
PRIMARY KEY (`id`)
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
AUTO_INCREMENT=12
;
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
</head>
<body>
</body>
</html>
<link rel="stylesheet" href="css/main.css">
table,th,td{
border: 1px solid black;
width: 1100px;
background-color: lightblue;
}
.bs_btn{
width: 20%;
height: 5%;
font-weight: bold;
}
<?php
$connection = mysqli_connect("localhost","root", "", "db_record");
$query = "SELECT * FROM record WHERE id='1'";
$query_run = mysqli_query($connection, $query);
$sql = mysqli_fetch_array($query_run);
//
?>
<?php
$connection = mysqli_connect("localhost","root", "", "db_record");
$query = "SELECT * FROM record WHERE id='1'";
$query_run = mysqli_query($connection, $query);
$sql = mysqli_fetch_array($query_run);
//
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap 4 Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<link rel="stylesheet" href="css/main.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container justify-content-center mt-5">
<h3>How do I pull out a single record in MySQLi and in Procedural with PHP?</h3>
<table class="table table-bordered mt-4">
<thead>
<th>First Name</th>
<th>LAst Name</th>
<th>Email</th>
</thead>
<tbody>
<tr>
<td><?php echo $sql['first_name'] ?></td>
<td><?php echo $sql['last_name'] ?></td>
<td><?php echo $sql['email'] ?></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>