Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag 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?
SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Are you loading this as a *.PHP page or a *.HTML page?  If it's just HTML, the PHP code won't execute.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial