php $_POST problem with text spaces
what im doing is posting the message from the previous page when the save button is clicked, and putting this message in the textbox..
PHP Code:
if (isset($_POST['Save'])) {
$text = $_POST['textarea'];
?> <textarea align="center" name="textarea" cols="70" rows="13">
<? echo $text; ?>
</textarea>
.. blah blah
but the text appears indented in the textbox, any idea why? :confused:
Re: php $_POST problem with text spaces
instread of
PHP Code:
<textarea align="center" name="textarea" cols="70" rows="13">
<? echo $text; ?>
</textarea>
try
PHP Code:
<textarea align="center" name="textarea" cols="70" rows="13"><? echo $text; ?></textarea>
Because you have indented your HTML (which is good) you have added in the space on the intentation to the text of the textarea.
Re: php $_POST problem with text spaces
ahh, i didnt know that had an effect, thanks alot!!
Re: php $_POST problem with text spaces
Textareas are set to white-space: pre unlike other elements which by default discard excess whitespace.