How is it possible to use old image if no image is selected?
its a profile page when someone updates his profile but don’t select the image for update then old image should be remained there..
should it be like this if-else statement or there would be some other way??
//check if file is selected.
if (empty($_FILES['profilepic']))
{
//if file selected this code should run
$fileselected="file selected";
}
else
{
//this executes if file not selected
$fileselected="No File Has Been Selected";
}
echo $fileselected;
How it should be coded??
Thanks to @Lion
Pretty much works for me.. 🙂