kingdna1980
Technical User
I am trying to update and store in mysql the file name of an uploaded file stored within the array
$_FILES['userfile']['name'].
However if you try and update with $_FILES['userfile']['name']... You aren't allowed.
If try and update mysql using... print $_FILES['userfile']['name'] you end up updating the filename as the nos 1 instead of the filename.
I've tried creating a new variable called $fname = print $_FILES['userfile']['name'] and tried to update using $fname but this still doesn't work. It also doesn't allow you to echo $_FILES['userfile']['name']. There must be a way of me being able to access the information witin the array $_FILES['userfile']['name'] and then passing this up to mysql. If anyone can help that would be awesome. Many thanks.
$_FILES['userfile']['name'].
However if you try and update with $_FILES['userfile']['name']... You aren't allowed.
If try and update mysql using... print $_FILES['userfile']['name'] you end up updating the filename as the nos 1 instead of the filename.
I've tried creating a new variable called $fname = print $_FILES['userfile']['name'] and tried to update using $fname but this still doesn't work. It also doesn't allow you to echo $_FILES['userfile']['name']. There must be a way of me being able to access the information witin the array $_FILES['userfile']['name'] and then passing this up to mysql. If anyone can help that would be awesome. Many thanks.