How To Show Data from Database Using PHP Coding

  1. Home
  2. Tags
  3. How To Show Data from Database Using PHP Coding

How To Show Data from Database Using PHP Coding

Create A Design in Table or Cards, Div, like Boxes, listing data any design can be used

Open Coding File in Code Editor
using SELECT Query in Code types the name of the input field from which data has to be shown 
A connection file must be used because It is connected to the database.

 

<?php
$sql="SELECT * FROM tbl_register";
$q = $conn->query($sql);
while($row = $q->fetch(PDO::FETCH_ASSOC)){
?>
<?php $row['username'] ?>
<?php $row['email'] ?>
<?php $row['phone'] ?>
<?php 

?>