flemingmike Posted October 7, 2011 Share Posted October 7, 2011 hi, im can someone help me out with a file upload? i want to say if filename=abc.csv then do abc else do nothing Quote Link to comment https://forums.phpfreaks.com/topic/248644-check-file-name/ Share on other sites More sharing options...
AyKay47 Posted October 7, 2011 Share Posted October 7, 2011 sounds like you solved your own problem.. unless you don't actually know how to get the file name..? can you show your code please. Quote Link to comment https://forums.phpfreaks.com/topic/248644-check-file-name/#findComment-1276952 Share on other sites More sharing options...
PFMaBiSmAd Posted October 7, 2011 Share Posted October 7, 2011 <?php if($_FILES['your_file_field_name_here']['name'] == 'abc.csv'){ // name is abc.csv } else { // name is something else } Quote Link to comment https://forums.phpfreaks.com/topic/248644-check-file-name/#findComment-1276956 Share on other sites More sharing options...
flemingmike Posted October 7, 2011 Author Share Posted October 7, 2011 thanks! Quote Link to comment https://forums.phpfreaks.com/topic/248644-check-file-name/#findComment-1276962 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.