• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot get image path from the database table

            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 !

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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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