Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8868141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:11:50+00:00 2026-06-14T17:11:50+00:00

Possible Duplicate: Save Data in Arabic in MySQL database I have a problem with

  • 0

Possible Duplicate:
Save Data in Arabic in MySQL database

I have a problem with retrieving Arabic data from MYSQL database using PHP, it appears as question marks “????” in HTML:

  1. I have a database with “utf8_general_ci” as collation.
  2. The database contains some data in Arabic Language.
  3. The HTML encoding is “UTF-8”.
  4. When I tried to retrieve the data in HTML, it appears as “?????”.

Please Help !!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:11:51+00:00Added an answer on June 14, 2026 at 5:11 pm

    you must set charset in first connect with mysql by this query:

    SET CHARACTER SET utf8
    

    for example in mysqli functions

    $MySQL_Handle = mysqli_connect(HOSTNAME,DATABASE_USERNAME,DATABASE_PASSWORD,DATABASE_NAME) 
    or die ( mysqli_error($MySQL_Handle) ); 
    
    $sSQL= 'SET CHARACTER SET utf8'; 
    
    mysqli_query($MySQL_Handle,$sSQL) 
    or die ('Can\'t charset in DataBase'); 
    

    and PDO sample :

    $dbh = new PDO('mysql:host=localhost;dbname=' . $DB_NAME, $DB_USER,
    $DB_PASS, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'"));
    $dbh->exec("SET CHARACTER SET UTF8");
    

    this action need before insert and before select.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Save my cookie data to MySQL database? I want save data into
Possible Duplicate: Save my cookie data to MySQL database? I am new in programming
Possible Duplicate: How to share all the data i have stored using sqlite database
Possible Duplicate: Getting detected data from the UITextView I have posted the same question
Possible Duplicate: How to save in the dropdown the value choosed? I have a
Possible Duplicate: How do I make a request using HTTP basic authentication with PHP
Possible Duplicate: How to fetch result from MySQL row with multiple same-name columns with
Possible Duplicate: Find url from string with php I found this code: but 2
Possible Duplicate: saving data in iOS Do we have a provision profile to select
Possible Duplicate: Loading richtextbox content from xml I am trying to save and load

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.