[eluser]quest13[/eluser]
Hi, I upload a image or pdf and store the path in a database and save the file under the folder uploads.When I provide 'View' to a user,I want to give a link only if the file stored is a pdf else if it is a image, I just want to directly display without any link.In order to do this, I want to confirm the file type.Can anyone tell me how it is done?
ex: image-- > uploads/test1.jpg
pdf-- >uploads/test1.pdf
Thanks in advance