Jump to content

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)

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.