Welcome Guest, Not a member yet? Register   Sign In
Problems escaping with db->escape and the active record

Hi guys im havin a problem,m as you can see in the title.

$this->db->set('username', $this->db->escape($_POST['username']));
$this->db->set('name', $this->db->escape($_POST['name']));

so the data is inserted in the database like this:

table users:
username | name
'user' | 'myname'

and when i retrieve the data and echo somewhere in the page, the result
comes with '

<b>Username: 'user'</b>
<b>Name: 'myname' </b>

How i can fix this thing.

And the other problem tham im haivng is saving values like: é,á,ñ.
this values are represented in the database like: 'o?o?',
or are truncated or deleted.

and usign mysql_real_escape_string, is not working either

Thanks for all your replies.

Theme © iAndrew 2016 - Forum software by © MyBB