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: enter image description here

you forgot <?php ?> here

<img src="<?php echo $dir.$name; ?>" width="100" height="100"/> 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -