Setting a default image if theres no image selected?

See all posts Reply

Setting a default image if theres no image selected? new!
by Damian, 16 years, 10 months ago
I was wondering if is there any way to set a default image if theres no selected image in the file input. Ive been trying to do this without succes.

Thanks a lot for reading.Reply
Re: Setting a default image if theres no image selected? new!
by Lex, 16 years, 10 months ago
Hi, if the user doesnt select a image then it wont upload...
When you show the image on the screen you check if it exists (file_exists in php)
if it doesnt exist then show a default image...

Good LuckReply
Re: Setting a default image if theres no image selected? new!
by colin, 16 years, 10 months ago
What you want to do has to be done outside the class. You can check what is in $_FILES, and act upon it accordingly. It there is an image, then you process it with the class; if there is no image, then you use the replacement image.Reply