html - Why my uploaded image didn't show on my php page? -
below main page uploaded page:
<form id="form1" method="post" action="display.php" enctype="multipart/form-data" id="pro_image"> <input type='file' onchange="readurl(this);" name="image" id="image"/> <br><img id="blah" src="profile pic.jpg" alt="your image" width="160px" height="120px"/><br/> </form> incorporated image display page(display.php) script:
<?php $dir="upload/"; $name=$_files['image']['name']; $tmp=$_files['image']['tmp_name']; move_uploaded_file($tmp,$dir.$name); ?> <br /><img src="".$dir.$name."" width="100" height="100"/> anyone can me point out actual problem on display.php , correct script?the image didn't show desired on page.
the output of display.php show above: 
you forgot <?php ?> here
<img src="<?php echo $dir.$name; ?>" width="100" height="100"/>
Comments
Post a Comment