Hello. I am having problem in retrieving image name in text area from database. suppose i have a code like : <td>Picture</td><td><input type="file" name="photo" value = "<?php echo "<img src=\"http://localhost/test/uploads/".$getmodelbyid['picture']."\">"; ?>" ><td> isint this suppose to retrieve the image file name and show in the text area? I know that using type="text" i can easily retrieve the image name. But i want to retrieve it in type="file" as it is easier for me to edit or change the image. If it is possible please help me to do it. Thankyou
You can`t put on type="file" value !, try to make on first <input type="file" name="photo"> and <Br/><img src=""> to show .
Where is the mentioned 'textarea' ? You don't use html 'input' tag to 'retrieve' something. If you want to show the image you should use <img src='path_to_img' title='image_title' alt='alt_text' /> Code (markup):
Put only image name like $path.$getmodelbyid['picture'] into input type file's name that will show your file's name and path and use img src for the showing image