Welcome Guest, Not a member yet? Register   Sign In
Upload Data File Name
#1

[eluser]Bl4cKWid0w[/eluser]
I am trying to make a profile form which allows a user to upload a photo. I got the actual upload to work, but now I can't figure out how to get the name of the file. I need the name of the file so I can update the user's database information. I tried using $this->upload->data('file_name') to get it, but it returns a database error saying something about the array in the column name.
#2

[eluser]xwero[/eluser]
the upload->data method generates an array with information about the uploaded file.
#3

[eluser]Bl4cKWid0w[/eluser]
Yes, I am aware of that. But usually to display an array, you assign it to a variable... such as $file = array('file_name' => ''); and then display it with $file['file_name']. What is the title of this array is what I am getting at.
#4

[eluser]xwero[/eluser]
that is how you do it with the method too
Code:
$data = $this->upload->data();




Theme © iAndrew 2016 - Forum software by © MyBB