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 7079479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:40:38+00:00 2026-05-28T06:40:38+00:00

I wrote a PHP file which should insert values in a MySQL database. I

  • 0

I wrote a PHP file which should insert values in a MySQL database.

I explain my problem with an example.

include 'db_connect.php';
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER SET 'utf8'");
$title = 'knödel';
echo $title;
$sql="INSERT INTO RECIPES (title) VALUES ('$title')"; 

In the database, there is ‘kn’;

I cut the string from the umlaut.

  • 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-05-28T06:40:39+00:00Added an answer on May 28, 2026 at 6:40 am

    If your database collation is Unicode or UTF-8, just do:

    $sql="INSERT INTO RECIPES (title) VALUES (N'$title')"; 
    

    The only difference is the N character which makes it possible to insert Unicode data into the database.

    And you have to take the security risks seriously. Use mysql_real_escape_string together with other required actions to protect against sql injections. (If you don’t do it now, you’ll forget it when writing a big real-world application.)

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

Sidebar

Related Questions

I wrote a PHP CUrl Class, if i execute Methods which should return the
I have a php function I wrote that will take a text file and
I want to write batch file for my own php framework. for example i
I've just installed PHPUnit and wrote a quick class which I saved to C:\PHP
Is there a script or class for PHP to parse the insert values from
Which file we should upload to server .scss or .css when we use Sass?
I wrote a PHP code like this $site=http://www.google.com; $content = file_get_content($site); echo $content; But
I want to write a php script that keeps the apache_log file open and
I'm trying to write some PHP to upload a file to a folder on
How can you allow a PHP script to write to a file with high-security

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.