In addition to my comment about not showing any code containing the
img_src
variable.
HTML attribute values should be quoted (browsers accept them usually also without quotes but it is not valid HTML) and must be quoted if they contain spaces or reserved characters:
<?php echo '<img src="' . $image_path . '" width="500" height="400">'; ?>
[EDIT]
This code seems to be copied and pasted together and won't work as expected:
$sql="SELECT image_path FROM images where user_name = '".$_SESSION['username']."'";
$result = $con->query($sql);
$file_name=$row['file_name'];
$image_path=$row['image_path'];
If the above has been fixed to return a path from the database (or print some feedback if not), the path can be used for the
img
tag provided that the files exists and is a path relative to the web server's document root (beginning with '/') or relative to the current page.
[/EDIT]