Reputation: 141
i have a form with textareas like this:
<TEXTAREA NAME="tekniku_mesazh" id='tekniku_mesazh' COLS=40 ><pre><?php echo $row['tekniku_mesazh'];?></TEXTAREA>
Now, what i need to do is, i want the text to be visible inside it, i've tried:
textarea {
overflow:visible;
}
But this won't work, why is that? Thanks
Upvotes: 1
Views: 2317
Reputation: 14845
Possible problems:
1) If your $row['tekniku_mesazh'] string has html special chars, that may hide the text. escape them:
<TEXTAREA NAME="tekniku_mesazh" id='tekniku_mesazh' COLS=40 ><pre><?php echo htmlentities($row['tekniku_mesazh']);?></TEXTAREA>
2) The "pre" tag is not closed, that will not hide the content, but it's a mistake also:
<TEXTAREA NAME="tekniku_mesazh" id='tekniku_mesazh' COLS=40 ><pre><?php echo htmlentities($row['tekniku_mesazh']);?></pre></TEXTAREA>
3) It's only a small/perfectionist mistake: use lowercase for tags:
<textarea name="tekniku_mesazh" id='tekniku_mesazh' cols=40 ><pre><?php echo htmlentities($row['tekniku_mesazh']);?></pre></textarea>
You may also simplify the php by using the shorter sintax (but that is not a mistake):
<textarea name="tekniku_mesazh" id='tekniku_mesazh' cols=40 ><pre><?=htmlentities($row['tekniku_mesazh'])?></pre></textarea>
I hope it help you.
Best regards, Adrian M.
Upvotes: 0
Reputation: 1717
You forgot a <pre>
and first you have to check if actually rows[] cointains something
so and the top of the script you should write
var_dump($row); // Just for Debugging
<textarea name="tekniku_mesazh" id='tekniku_mesazh' cols=40 ><pre><?php echo $row['tekniku_mesazh'];?></pre></textarea>
also you can use the id for the css
#tekniku_mesazh {
overflow:visible;
}
ps: you should a simple name for css :)
Upvotes: 1