Results 1 to 6 of 6

Thread: [RESOLVED] Default vaule for multiline text box

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2003
    Posts
    259

    Resolved [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?

  2. #2
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Default vaule for multiline text box

    Code:
    <textarea name="worktobedone" cols="40" rows="6" id="worktobedone"><?=  $worktobedone; ?></textarea>

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2003
    Posts
    259

    Re: Default vaule for multiline text box

    works great smitty. thanks

  4. #4
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    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?>
    Like Archer? Check out some Sterling Archer quotes.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2003
    Posts
    259

    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?
    Code:
    <? echo $var; ?>
    if so should this be in every php script i use?

  6. #6
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    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.
    Like Archer? Check out some Sterling Archer quotes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width