Welcome Guest, Not a member yet? Register   Sign In
Solved: non-object error
#4

I already able to capture the file name but unable to print it out correctly.

controllers/upload_image.php

$data = array('upload_data' => $this->upload->data(),
'file_name' => $this->upload->data('file_name')
);

$this->photo_model->insert_pic();

$this->load->view('upload_success', $data);

views/upload_success.php

<img scr="uploads/"<?php echo $file_name; ?>>

If I checked through inspect element I get this html code:

<img src="uploads/"davy210.png="">

which is in correct.
" If I looks more intelligence please increase my reputation."
Reply


Messages In This Thread
Solved: non-object error - by davy_yg - 04-26-2018, 10:16 PM
RE: non-object error - by InsiteFX - 04-27-2018, 04:39 AM
RE: non-object error - by davy_yg - 04-28-2018, 06:01 AM
RE: non-object error - by davy_yg - 04-28-2018, 07:17 AM
RE: non-object error - by davy_yg - 04-28-2018, 07:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB