I want when I go to update form to show the image name from database there were is write "No file chosen"
or to auto-select the photo from the database. All the data from my database is loaded on the fields. Is that possible?
Photo image to see what i mean:
HTML image form:
<b>Poze</b>
<font color="red">*</font>
<input type="file" name="image">
PHP code for image:
$folder ="uploads/";
$path = $folder . $image ;
$target_file=$folder.basename($_FILES["image"]["name"]);
$imageFileType=pathinfo($target_file,PATHINFO_EXTENSION);
$allowed=array('jpeg','png' ,'jpg'); $filename=$_FILES['image']['name'];
$ext=pathinfo($filename, PATHINFO_EXTENSION);
if(!in_array($ext,$allowed) ) {
$errMsg = 'Se accepta doar imagini. Extensie: JPG, PNG, GIF.';
}
else{
move_uploaded_file( $_FILES['image'] ['tmp_name'], $path);
}