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

  • SEARCH
  • Home
  • 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 8537495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:54:54+00:00 2026-06-11T10:54:54+00:00

I am using PHP and MySQL for an application. Questions are: How to store

  • 0

I am using PHP and MySQL for an application.

Questions are:

  1. How to store data in MySQL नवीन खेतिहर उपकरण। readable format or निलेस र पà¥à¤¬ format

  2. When user enters data in a textbox and clicks on submit, at that time we get data in different format. What we need to do should we convert and store in MySQL in readable format.

  • 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-11T10:54:55+00:00Added an answer on June 11, 2026 at 10:54 am

    Choose utf8 character set and utf8_general_ci collation.

    Obviously, Collation of the field (to which you want to store Hindi text) should be utf8_general_ci.

    To alter your table field, run

    ALTER TABLE `<table_name>` CHANGE `<field_name>` `<field_name>` VARCHAR(100) 
    CHARSET utf8 COLLATE utf8_general_ci DEFAULT '' NOT NULL;
    

    Once you’ve connected to database, run the following statement at first

    mysql_set_charset('utf8');
    

    Eg:

    //setting character set
    mysql_set_charset('utf8');
    
    //insert Hindi text
    mysql_query("INSERT INTO ....");
    

    To retrieve data

    //setting character set
    mysql_set_charset('utf8');
    
    //select Hindi text
    mysql_query("SELECT * FROM ....");
    

    Before you printing any unicode text (say Hindi text) on browser, you should have to set content type of that page by adding a meta tag

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    

    Eg:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Example Unicode</title>
    </head>
    
    <body>
    <?php echo $hindiText; ?>
    </body>
    </html>
    

    Update:

    mysql_query("SET CHARACTER SET utf8") has changed tomysql_set_charset(‘utf8’);
    This is the preferred way to change the charset. Using mysql_query() to set it (such as SET NAMES utf8) is not recommended. See http://php.net/manual/en/function.mysql-set-charset.php*

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

Sidebar

Related Questions

i was developing my php application and using mysql to store session data and
We have a custom PHP/MySQL web application that gets updated and copied (using SFTP)
I have a web application that needs to be built using PHP/MySQL. The application
We have a web application that has been built using MySQL / PHP /
Using PHP, I am building an application that is MySQL database resource heavy, but
A legacy web application written using PHP and utilizing MySql database needs to be
I'm building this application using PHP, MySQL and jQuery. Essentially it's a checklist management
I'm currently designing a web application using php, javascript, and MySQL. I'm considering two
I have been working on on an AJAX chat application using php, mysql. It's
I'm using PDO in my PHP application. It connects to a MySQL server on

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.