Aleks
Aleks

Reputation: 147

How I can get the image, which already uploaded?

Problem is in getting image file, EXAMPLE: create user's profile with name and photo. But after that I want to change name and my EDIT form has two field NAME and PHOTO, but I want to change ONLY NAME, but input file always empty and default value null. So if will not to choose a picture and click submit, then in my db the path to image will change to null. So how I can get image? I read about hash but did not understand how is it to use

Upvotes: 0

Views: 139

Answers (1)

reza yavari
reza yavari

Reputation: 126

You can use this code:

$image = '';

if ($image != null) {
    "Use query upload image" ;
} else {
    "Use query update" ;
}

Upvotes: 2

Related Questions