[RESOLVED] Default vaule for multiline text box
I have a multi line text box that im trying to populate with this code
Code:
<tr>
<!-- Row 4 Column 1 -->
<td><span class="style14">Work to be completed :</span><br />
<textarea name="worktobedone" cols="40" rows="6" id="worktobedone" value="<? echo $worktobedone; ?>"></textarea></td>
</tr>
the $worktobedone variable has the proper value in it cause i echo it just before this section and it had the correct value. I have all my forms text boxes filled in except for two multiline text boxes. what am i doing wrong with this code?
Re: Default vaule for multiline text box
Code:
<textarea name="worktobedone" cols="40" rows="6" id="worktobedone"><?= $worktobedone; ?></textarea>
Re: Default vaule for multiline text box
works great smitty. thanks
Re: [RESOLVED] Default vaule for multiline text box
you shouldn't use short tags like that if you want to have cross-compatibility (with different versions of PHP, and also other servers):
PHP Code:
<?php echo $var; ?>
Re: [RESOLVED] Default vaule for multiline text box
so i should always put the word php in like this
Code:
<?php echo $var; ?>
instead of like this?
if so should this be in every php script i use?
Re: [RESOLVED] Default vaule for multiline text box
yes. short tags are deprecated and are also not even enabled on some host servers. using the <?php tag will ensure that your script will work everywhere.