keep checkbox checked

Discussion in 'PHP' started by ultimategp, Jan 2, 2007.

  1. #1
    hi in a php proxy for example www.privacynest.com how can i by default keep the part where it says 'include min URL-form- checked no matter what?
     
    ultimategp, Jan 2, 2007 IP
  2. trevlar

    trevlar Peon

    Messages:
    65
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Change

    <input name="ops[]" checked="checked" type="checkbox">
    Code (markup):
    to

    <input name="ops[]" checked="checked" type="checkbox" disabled="disabled">
    Code (markup):
     
    trevlar, Jan 2, 2007 IP
  3. ultimategp

    ultimategp Peon

    Messages:
    307
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    but i have to keep a specific box checked dont know how to put that code in for it
     
    ultimategp, Jan 2, 2007 IP
  4. weknowtheworld

    weknowtheworld Guest

    Messages:
    306
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    trevlar is correct..
     
    weknowtheworld, Jan 2, 2007 IP
  5. ultimategp

    ultimategp Peon

    Messages:
    307
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    but i dont know where i shuld place the code like do i just place it anywhere?
     
    ultimategp, Jan 2, 2007 IP
  6. trevlar

    trevlar Peon

    Messages:
    65
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #6
    No, you replace the current one with the one I provided.

     
    trevlar, Jan 3, 2007 IP
  7. LongHaul

    LongHaul Peon

    Messages:
    670
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #7
    As an aside to this, what's with the brackets in "ops[]"? I didn't know you could do that in a form, what exactly does it do?
     
    LongHaul, Jan 3, 2007 IP
  8. solidphp

    solidphp Peon

    Messages:
    46
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    The [] makes it an array. It let's your end user check more than one box. If you left off the [], only the last checked box would register.
     
    solidphp, Jan 4, 2007 IP