after uploading the image to a folder. how to display the image..
its my upload.php
I have tried your code and its working finely just need to change the line
echo'<img src= "upload/".$img>';
to
echo'<img src="'.$img.'">';
Try this:
header('Content-Type: image/jpeg');
readfile($imgPath);
You need:
echo '<img src="upload/'.$img.'"/>';
You mixed up some quotes. It should be :
$image = $_FILES["file"]["name"];
$img = "upload/".$image;
echo "<img src=\"upload/$img\">";
Don't put $img in quotations. When you do it the output is simply $img, not upload/...
echo < img src=" ' ,$img ,' ">;
As you've already put "upload" in $img
$img="upload/".$image;
You don't need to put it in src anymore
echo '<img src= "'.$img.'">';