I want to check if the user has selected an image for upload. What is the php script to do that after the user has clicked submit…
I tried file_exist(), but that expects a string rather than an array and it seems that only works for an absolute path. Since I don’t know which folder the user is going to upload from, this doesn’t work.
Can someone help?
Take a look at the
$_FILESsuperglobal.Tizag Tutorial: http://www.tizag.com/phpT/fileupload.php
If you do a
print_r($_FILES), you will see everything you need.