Avatar of Bruce Gust
Bruce Gust
Flag for United States of America asked on

Displaying HTML code in textarea. How?

Here's what I've got in my source code:

<textarea name="metatags"><META NAME="DESCRIPTION" CONTENT="RTA Kitchen Cabinets Online, Wholesale Kitchen Cabinets, Buy RTA Cabinets Online, Maple RTA Cabinets"> <META NAME="ABSTRACT" CONTENT="RTA Cabinets, Maple Cabinets, Wholesale Cabinets, Buy Cabinets Online"> <META NAME="KEYWORDS" CONTENT="RTA Cabinet,RTA Kitchen Cabinets, Maple Cabinets, Kitchen Cabinets, buy kitchen cabinets, buy cabinets online, cabinets, rta cabinets, cabinet maker"> </textarea>

This is the result of my doing this:

<textarea name="metatags"><?php echo htmlspecialchars_decode($row['metatags']); ?></textarea>

I'm not seeing anything. My textarea is blank.

What do I need to change?
PHPHTMLWeb Languages and StandardsWeb DevelopmentWeb Browsers

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon
SOLUTION
Ryan Chong

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Brian Tao

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Dave Baldwin

Are you loading this as a *.PHP page or a *.HTML page?  If it's just HTML, the PHP code won't execute.
SOLUTION
srihari chander

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Ray Paseur

Please tell us from a high-level, non-technical perspective: What are you trying to achieve?  The <textarea> is used for HTML input - a place for a client to type information that gets sent to the server.  So this looks very unusual, to be loading a textarea up with things that are normally found in the <head> of the HTML document.  Plus, these are not valid HTML markup, but we can deal with that in another question.  For now, just tell us the objectives and we can probably show you a good way to go about things.
ASKER CERTIFIED SOLUTION
Ray Paseur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes