Get uploaded picture from mysql database |
[eluser]rochellecanale[/eluser]
hello guys i need a help regarding of getting the picture from my database literally the file path. My problem is after u run the query. It will continue to load and view nothing just keep on loading. Here's my code below hope you can help me. Code: $username = $this->session->userdata('username'); Here's the sample output from my database: Code: +-----------------------------------------+ When i attempt to run in sql like this: Code: mysql> SELECT file_path FROM upload WHERE username = 'ssssssssssss'; It display a path but when i load it in my php code it shows nothing.
[eluser]LuckyFella73[/eluser]
DB queries goes into models and echo image tags into views but basically you can do your query like that: Code: $this->load->library->('database');
[eluser]rochellecanale[/eluser]
Its not showing any images. I tried also displaying of the full_path from my database but it loads only. I dont know my exact problem.
[eluser]LuckyFella73[/eluser]
Quote:+-----------------------------------------+ Does your browser display the image when you paste the url directly into url field?
[eluser]rochellecanale[/eluser]
I tried to create a simple image tag like this. Code: <img src='http://localhost/eMLM/upload/Sunset.jpg' height='100' width='100'> And it displays the image from my folder. But when i attempt to pull down the data from my mysql database it does not show. It keeps on loading.
[eluser]rochellecanale[/eluser]
By the way if i attempt to run it in my url id displays Code: Object not found!
[eluser]LuckyFella73[/eluser]
What do you get if you debug like: Code: $this->load->library->('database');
[eluser]rochellecanale[/eluser]
Ok nothing displays it load again. It does not shows the path.
[eluser]LuckyFella73[/eluser]
Seems you have to set up your htaccess the right way first? The error you posted is not related to your database call. Looks like your controller isn't called correctly. |
Welcome Guest, Not a member yet? Register Sign In |