doforumda Posted November 17, 2009 Share Posted November 17, 2009 hi can anybody tell me how can i get the name of the file which is being uploaded to the server? i need this because when the user uploads a file then the php script will get the name of the file and insert it into db. Link to comment https://forums.phpfreaks.com/topic/181812-need-help-in-uploading-file/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 17, 2009 Share Posted November 17, 2009 The section in the documentation that describes how to handle uploaded files using php would be your first step - http://us2.php.net/manual/en/features.file-upload.post-method.php Link to comment https://forums.phpfreaks.com/topic/181812-need-help-in-uploading-file/#findComment-958840 Share on other sites More sharing options...
doforumda Posted November 17, 2009 Author Share Posted November 17, 2009 i know this i created script for uploading but in that script there is an extra input field to enter the name of the file. i want to get the name of the file and insert into db so there will be no extra input field in the form for the name. Link to comment https://forums.phpfreaks.com/topic/181812-need-help-in-uploading-file/#findComment-958845 Share on other sites More sharing options...
mikesta707 Posted November 17, 2009 Share Posted November 17, 2009 $_FILES['name'] is the name of the file being uploaded... Link to comment https://forums.phpfreaks.com/topic/181812-need-help-in-uploading-file/#findComment-958847 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.