Page 1 of 1
<TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>
Posted: Fri Feb 06, 2009 9:48 pm
by Jezza
basically i've made my own remote control for my PHP site so i can work on my site while im away etc.
so i make it load a page and it displays the content in a textarea like <TEXTAREA>content</TEXTAREA> but if the page im editing has a textarea in it like <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA> then it cuts out early and this random code gets scribbled all over the screen, how can i fix it so if there is a </TEXTAREA> in the content it doesn't cut out there?
Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>
Posted: Sat Feb 07, 2009 3:55 am
by dheeraj
try css property i.e width & height......
Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>
Posted: Sun Feb 08, 2009 12:58 am
by Jezza
Let me rephrase this how do i put the text "<TEXTAREA></TEXTAREA>" in a textarea without it treating the "</TEXTAREA>" as HTML code
Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>
Posted: Sun Feb 08, 2009 6:04 am
by BETA
I think this is what you want
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Title</title>
</head>
<body>
<form>
<textarea name="textbox" rows="10" cols="50">
<TEXTAREA></TEXTAREA>
</textarea>
</form>
</body>
</html>
Hope that helps!
Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>
Posted: Sun Feb 08, 2009 3:26 pm
by Jezza
Thanks! I now formed this so that in the textarea it will print the string variable $load which is the bellow, it works great thanks!
Code: Select all
$load = read($root.$_GET['load'],2);
$load = str_replace("<textarea>","<textarea>",$load);
$load = str_replace("<TEXTAREA>","<TEXTAREA>",$load);
$load = str_replace("</textarea>","</textarea>",$load);
$load = str_replace("</TEXTAREA>","</TEXTAREA>",$load);
PS: Don't get confused about the read function, there is none but i created it myself (i dont like all the fopen stuff lol).
Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>
Posted: Sun Feb 08, 2009 3:34 pm
by Weirdan
Jezza wrote:Thanks! I now formed this so that in the textarea it will print the string variable $load which is the bellow, it works great thanks!
Code: Select all
$load = read($root.$_GET['load'],2);
$load = str_replace("<textarea>","<textarea>",$load);
$load = str_replace("<TEXTAREA>","<TEXTAREA>",$load);
$load = str_replace("</textarea>","</textarea>",$load);
$load = str_replace("</TEXTAREA>","</TEXTAREA>",$load);
PS: Don't get confused about the read function, there is none but i created it myself (i dont like all the fopen stuff lol).
Better way would be to properly encode all html entities:
Code: Select all
$load = read($root . $_GET['load'], 2);
$load = htmlspecialchars($load);