Jump to content

The character ó bug


kmukund87

Recommended Posts

This problem seems very strange as it works perfectly fine when i use the phpmyadmin to update a field in my table but does not work when i use an sql command from php

The text contains the letter "ó" and when executed from a php command, changes to a "?" and sits in the table.

This problem does not occur when I use phpmyadmin

Can someone please help me?

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/214233-the-character-%C3%B3-bug/
Share on other sites

Hi, I just solved the problem 2 minutes ago by using htmlentities instead of htmlspecialchars to sanitize my sql inputs.

So this thread can be considered solved .

But anyway, here is the code

 

UPDATE page_content SET message = '$message' WHERE uid= 12

 

and $message is simply "ó". This does not work and when i look in the DB, message is "?" . message is a  VARCHAR (I also tried with TEXT yeilding the same result)

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.