Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67497

input file if empty select a default file

$
0
0

so i want to select a default if my users don't select a file.

i checked if the file input is empty. and i don't know the next steps. here is my code.

PHP:

if ($_FILES['ilyes']['size'] == 0)
{
    // select the default file(name="blanc.jpeg" and the path="../blanc.jpeg")
}

HTML:

<input type="file" name="ilyes">

Viewing all articles
Browse latest Browse all 67497

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>