<TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Jezza
Forum Newbie
Posts: 6
Joined: Fri Feb 06, 2009 9:41 pm

<TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>

Post 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?
User avatar
dheeraj
Forum Commoner
Posts: 40
Joined: Fri Feb 06, 2009 11:54 am

Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>

Post by dheeraj »

try css property i.e width & height......
Jezza
Forum Newbie
Posts: 6
Joined: Fri Feb 06, 2009 9:41 pm

Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>

Post 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
BETA
Forum Commoner
Posts: 47
Joined: Fri Jul 25, 2008 3:21 am

Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>

Post 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!
Jezza
Forum Newbie
Posts: 6
Joined: Fri Feb 06, 2009 9:41 pm

Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>

Post 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).
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: <TEXTAREA><TEXTAREA></TEXTAREA></TEXTAREA>

Post 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);
 
Post Reply