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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:22:19+00:00 2026-05-30T10:22:19+00:00

Im having a bit of an issue with decoding data coming from a database.

  • 0

Im having a bit of an issue with decoding data coming from a database.

My data is stored in the database as utf8, for this instance the data is ‘corrosion & time’, which is stored as ‘corrosion & time’. Now i want to populate a field of the form with this data, this field has a htmlSpecialChars filter applied.

When viewed in the browser I see:
‘corrosion & time’

If I use html_entity_decode i get:
‘corrosion $amp; time’

and if i also remove the filter from the form i then get:
‘corrosion & time’

Is there anyway i can populate the form without removing the filter from the field?

  • 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-30T10:22:21+00:00Added an answer on May 30, 2026 at 10:22 am

    you are going to have to decode the data before populating the form, the filter should not be applied to the data coming from the form until it’s posted which will reapply the filter when getValues() is called.

    If you know you used htmlspecialchars to encode the data then use htmlspecialchars_decode to decode the data.

    Description
    
    string htmlspecialchars_decode ( string $string [, int $quote_style = ENT_COMPAT ] )
    
     This function is the opposite of htmlspecialchars(). It converts special HTML entities back to characters. 
    
    The converted entities are: &, " (when ENT_NOQUOTES is not set), ' (when ENT_QUOTES is set), < and >. 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Coming from Win32, I am having bit of an issue or a problem trying
I'm having a bit of an issue with PHP emailing from a HTML form.
I am having a bit of an issue getting the file path from the
I'm having a bit of an issue when dealing with getting a timestamp from
As you can tell from the title, Im having a bit of issue regarding
Having a bit of a hairy issue when submitting data over a jquery ajax
I'm having a bit of an issue. I am getting some values from my
I'm having a bit of an issue uploading files to a database. The table
I'm having a bit of an issue. For some reason, this class I'm trying
hello fellow java developers. I'm having a bit of an issue here. I have

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.