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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:30:43+00:00 2026-06-09T22:30:43+00:00

I am sending data to a PHP backend file via AJAX method POST. The

  • 0

I am sending data to a PHP backend file via AJAX method POST. The data comes from a textarea, whose form has the next atribbute accept-charset="UTF-8".
The AJAX function sends data as http[act].send("title=" + encodeURIComponent(field.value)...) and my PHP backend file begins with header('Content-Type:text/html; charset=UTF-8');. Database ACCEPT NAMES and FIELDS are all set to UTF-8 (never had problems with this stuff).

I think I should decode in the PHP backend the encodeURIComponent() func. But how?

Edit (sorry):

Fibra dietética is inserted in DB as fibra dietética
Acompañada is inserted as Acompañada

…and so on.

  • 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-09T22:30:44+00:00Added an answer on June 9, 2026 at 10:30 pm

    Mistake. I was using htmlentities() (PHP) on the string before doing INSERT. A good alternative was using strip_tags() (PHP) to avoid “HTML/Js/… injection“. Thanks to everyone for helping. i hope this will be useful for someone.

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

Sidebar

Related Questions

I am sending data via jQuery's .ajax method to my PHP file. Both files
i have an easy ajax script which sending data to php file with no
I have an ajax request sending some data to a php file: Ext.Ajax.request({ url:
I have an issue with sending POST data from my form. There is a
Hi I have a problem in sending data from php to pdf. I think
I am trying to receive a json object back from php after sending data
When sending data via POST or GET with jQuery you use for format {
I am trying to send the POST data from java to a PHP page.
i have this code for sending data var test={imagename:apple.jpg,x:13,y:33}; $.ajax({ type: POST, url: some.php,
I am preparing and sending a JSON string from my PHP file to my

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.