I'm trying to echo a variable from my php script inside a div but i'm not getting any result.Here is my code :
<?php
session_start();
session_name();
$con = mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("bloggers", $con) or die(mysql_error());
$data = "Select * from accountprofile where Username = '" . $_SESSION['Sess_user'] . "' and Password = '" . $_SESSION['Sess_pass'] . "'";
$result = mysql_query($data);
while($row = mysql_fetch_array($result)) {
$row['Fname'];
$row['Username'];
$row['Password'];
}
mysql_close($con);
?>
and here is my div where i want to display the variable $row['Fname'];
<div class="title" style="font-size: 36px;">
<?php echo $row['Fname']; ?>
</div>
Sorry i am just new in html and php .Please help thanks.