how to get data from mysql database using php

,

<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "search";

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

$sql = "Select * from keywords";

$result=mysqli_query($conn,$sql);

while ($row = $result->fetch_row()) {
print '<pre>';
print_r($row);
print '</pre>';
}
?>


Related Post


Latest Post


Recent Posts Widget

Make sure to never miss a thing...

Get the latest news from the creative industry along with other creative goodies, conveniently delivered to social media.