SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML form question

    I'm not 100% sure if this is a HTML issue or PHP but I'm reading PHP and MySQL Novice to Ninja! I'm on page 119 and am hung up on a bit of code for the form.

    <div>
    <label for="joketext">Type your joke here: </label>
    <textarea id="joketext" name="joketext" rows="3" cols="40">
    </textarea>
    </div>

    Please elaborate on this bit of code.

    I believe the textarea id="joketext" is part of the associative array.
    I believe the textarea name="joketext" is the post variable.
    I'm totally lost as to what the label for="joketext" is for.

  2. #2
    SitePoint Enthusiast 3dy.ro's Avatar
    Join Date
    Feb 2011
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's the label for the textarea with the name "joketext".

    (This is what a <label> is.)

  3. #3
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,408
    Mentioned
    273 Post(s)
    Tagged
    5 Thread(s)
    There is a fuller explanation of label here: http://reference.sitepoint.com/html/label

  4. #4
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    AH! That makes since now. Thanks. That helped a lot.


Bookmarks

Posting Permissions

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