<?php
include 'connectMySql.php';
if(! $conn )
{
die('Could not connect: ' . mysql_error());
}
$sql = 'SELECT * FROM users ';
$result = mysql_query( $sql);
if(! $result)
{
die('Could not get data: ' . mysql_error());
}
while($row = mysql_fetch_assoc($result, MYSQL_ASSOC))
{
echo "ID : {$row['id']} <br> ".
"USERNAME : {$row['username']} <br> ".
"EMAIL : {$row['email']} <br> ".
"--------------------------------<br>";
}
echo "Fetched data successfully\n";
?>
RainaAnja -3 Light Poster
RainaAnja -3 Light Poster
JorgeM 958 Problem Solver Team Colleague Featured Poster
matrixdevuk 71 6t9.me Founder
OsaMasw 13 Loving Helper
RainaAnja -3 Light Poster
matrixdevuk 71 6t9.me Founder
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.