Hello everyone I am trying to access the data from mysql to html page. For this I create these classes
HomeManager.php
<?php
session_start();
class HomeManager
{
function fetchUser($arr)
{ $userid=$_SESSION['uid'];
require_once(FRONT_ROOT_PATH.'DatabaseManager.php');
$query ="Select * from tbusers where userid='".$userid."'";
$db= new DatabaseManager();
$result=$db->executeQuery($query);
return $result;
}
}
Homeinit.php
<?php
include(LIB_PATH."Home/HomeManager.php");
if(isset($SESSION['uid']))
{
$obj=new HomeManager();
$user=$obj->fetchUser($_POST)
if(Count($user)>0)
{
$username=$user['username'];
}
}
?>
And I am using this class on this html page
Home.php
<?php
include('../../Include/config.inc.php');
include(LIB_PATH."Home/Homeinit.php");
?>
<html>
<head>
</head>
<body>
<div>
<input type="name" value=".$username."
</div>
</body>
</html>
I am at learning stage of PHP. Experts Please Help me how can I Fetch Record from mysql database and show it on my html page