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?
<TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>
Moderator: General Moderators
Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>
try css property i.e width & height......
Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>
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>
I think this is what you want
Hope that helps!
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>Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>
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!
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).
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);Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>
Better way would be to properly encode all html entities: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!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).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);
Code: Select all
$load = read($root . $_GET['load'], 2);
$load = htmlspecialchars($load);