$file_type = strrchr($images,".");
if($file_type ==".gif" || $file_type == ".jpg" || $file_type == ".jpeg")
It's can be work . $images is <input type="file" name="images"....> 's name.
And strrchr() in my code is to get this upload file type. so i think it can be work
.If you have any question .. i think we can talk about it ...
Anders wrote:
$file_type = strrchr($images,".");
if($file_type ==".gif" || $file_type == ".jpg" || $file_type == ".jpeg")
That won't work.. strrchr return the position where needle is found, not a substring.
You should have something like:
$file_type = substr($images, strrchr($images,"."));