Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

textarea problem 1

Status
Not open for further replies.

mufka

ISP
Dec 18, 2000
587
US
I think this is an HTML problem because it has to do specifically with how a <textarea> tag works. I have php scripts (which include some html) stored in a MySQL table. This is so I can update them and track revisions. I have an update script that pulls the existing script from the table and displays it for editing in a <textarea> box. I've run into a problem when the displayed script contains a textarea box itself. When it gets loaded into the text area for review, the </textarea> tag in the script gets recognized and it closes out the textarea that it is being displayed in.

Is there a way to adjust the <textarea> tag in the script that is displaying the stored script so that it doesn't parse the displayed code, just displays it?

The textarea currently looks like this:
Code:
<textarea rows="40" name="script_content" cols="120" ><? echo $script_content; ?></textarea>
 
Run your $script_contents variable through htmlentities() php function.





----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top