|
-
Oct 6th, 2010, 08:39 PM
#1
Thread Starter
Hyperactive Member
[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?
-
Oct 6th, 2010, 09:11 PM
#2
Re: Default vaule for multiline text box
Code:
<textarea name="worktobedone" cols="40" rows="6" id="worktobedone"><?= $worktobedone; ?></textarea>
-
Oct 6th, 2010, 09:16 PM
#3
Thread Starter
Hyperactive Member
Re: Default vaule for multiline text box
works great smitty. thanks
-
Oct 7th, 2010, 12:28 AM
#4
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; ?>
-
Oct 7th, 2010, 05:50 AM
#5
Thread Starter
Hyperactive Member
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?
-
Oct 7th, 2010, 08:05 AM
#6
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|