Input tag or textarea

Discussion in 'PHP' started by asd, Jul 6, 2008.

  1. #1
    I have this code in php file
    <input type=\"text\" id=\"title\" name=\"title\" size=\"50\" class=\"seyretinputbox\" value=\"".$videotitle."\"/>
    Code (markup):
    [​IMG]


    I want to replace this to textarea.
     
    asd, Jul 6, 2008 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    <?php
    echo '<textarea name="title" id="title" rows="3" cols="40" class="seyretinputbox">' . $videotitle . '</textarea>';
    ?>
    PHP:
    P.s. why does it all have to be in PHP? :\
     
    Danltn, Jul 6, 2008 IP
  3. Connor Beaton

    Connor Beaton Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It's a pretty compact way of doing it, I guess. Although he could always just do:

    <textarea name="title" id="title" rows="3" cols="40" class="seyretinputbox"><?php echo $videotitle; ?></textarea>
     
    Connor Beaton, Jul 6, 2008 IP
  4. asd

    asd Active Member

    Messages:
    134
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #4
    see this file
    can you please change me this
    http://www.sendspace.com/file/8t1p5f

    need to change this to textarea

    <input type=\"text\" id=\"itemcomment\" name=\"itemcomment\" size=\"50\" class=\"seyretinputbox\" value=\"".$itemcomment."\"/>
    Code (markup):
    and
    <input type=\"text\" id=\"itemcomment\" name=\"itemcomment\" size=\"50\" class=\"seyretinputbox\" value=\"\"/>
    Code (markup):
     
    asd, Jul 6, 2008 IP
  5. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #5
    Danltn, Jul 6, 2008 IP