CodeIgniter Forums

Full Version: Cannot get image path from the database table
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[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 ?)
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 !
Make sure you don't have xss_filter activated in the config file. Also try saving with htmlspecialchars()