0

I have an euro sign in the database. When I want to print it out on my website it is showing a question mark.

It's from text field --> database --> website.

Rizier123
  • 58,877
  • 16
  • 101
  • 156
JochemQuery
  • 1,495
  • 2
  • 26
  • 38

1 Answers1

1

Your database is not UTF-8.

This may help:

mysqli_query($conn, "SET NAMES utf8");

Or this query:

ALTER TABLE table_name CONVERT TO CHARACTER SET utf8

Also, include this <meta /> tag in the <head> of your HTML page:

<meta charset="UTF-8" />
uınbɐɥs
  • 7,236
  • 5
  • 26
  • 42
  • 1
    best to do both, also ensure the browser interprets the sent html also as UTF-8, therefore you can send an http header and/or add a html head field for the content type – DesertEagle Aug 14 '12 at 21:29