Sir, I am using these codes
<?php
require_once("connect.php");
if(isset($_POST ['display']))
{
$sql="select * from photo where id=2 ";
$query=mysqli_query($con,$sql);
while($row=mysqli_fetch_array($query))
{
$image=$row ['picture'];
echo '<img src="upload/'.$image.'" width="50" height="50">';
}
}
?>
<html>
<head>
<style type="text/css">
html {
overflow:auto;
}
body{
background-color:#e7f4fe;
}
#container {
margin: auto;
position:absolute;
top:0;left:0;right:0;bottom:0;
background-color:#CFC;
padding:10px;
overflow:auto;
width:200px;
height:200px;
border:1px solid #6CF;
text-align:center;
}
</style>
</head>
<body>
<div id="container">
<form action="" method="post"
enctype="multipart/form-data">
<img id="photo" width="100" height="100" src="photo96.png" style="text-align: center;" /><br />
<br>
<input type="submit" name="display" value="Display">
</form>
</div>
</body>
</html>
It work fine, but when I press display button then image from table is shown in top left corner of the screen but i want to display it in div like this: