Welcome Guest, Not a member yet? Register   Sign In
Cannot get image path from the database table

[attachment=67][attachment=68][attachment=69]i have stored image path in the database but i cannot retrieve it using query if i do i'm getting nothing .

here i have attched the images of database table and my coding the output !
please help me

and one more issue ,
i'm having data like <p>sss<img src="path" /></p> this in table but while retrieving I'm getting only the sss , (CANNOT WE RETRIEVE ANY HTML TAGS FROM THE DATABASE ?)
Thanks and Regards,
Thamaraiselvam T

Hello Thamaraiselvam,

I had the same problem when getting a xml string from database in one of my projects, the problem is that CI is escaping a lot of characters like "<" or ">" and others which appears in markup tags.

The only way to avoid values to be escape is to use the query() method from Database Class instead of Active Record methods.

So your code should look like this :

PHP Code:
$query $this->db->query("SELECT * FROM data");

$query->result() as $row)

It should solve your problem, if not feel free to ask again Smile

Good luck !

(This post was last modified: 01-06-2015, 08:03 AM by Avenirer.)

Make sure you don't have xss_filter activated in the config file. Also try saving with htmlspecialchars() http://stackoverflow.com/questions/16506...ot-working

Theme © iAndrew 2016 - Forum software by © MyBB