• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uploading image name to the database

#1
[eluser]Unknown[/eluser]
hi i am new the CI , i have successfully uploaded the file to the server but in order to retrieve the image must put in database.

can anyone help me of this

i have done like this

$upload_data = $this->upload->data();
$filename = $upload_data['file_name'];

$this->load->model('register');
if($query = $this->register->registration($filename))
{
echo 'inserted';
}
else
{
echo 'error';
}
from here how can i insert into the model ,anyone please help for me...

#2
[eluser]saidai jagan[/eluser]
If the upload in success and the query returns the last insert id.
Then u r code is correct.

#3
[eluser]Tandubhai[/eluser]
You are already done.....
:-) Tandubhai


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.