Jump to content

JovanLo

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Posts posted by JovanLo

  1. try this : echo $item will print the selected values.

     

    <?

    $cat_id_array=$_POST["cat_id"];

    foreach($cat_id_array as $key=>$item){

        echo $item;

    }

    ?>

    <html>

    <form method="post" action"">

    <label><input type='checkbox' name='cat_id[]' value='1'/>Food</label>

    <label><input type='checkbox' name='cat_id[]' value='2'/>Gas</label>

    <label><input type='checkbox' name='cat_id[]' value='3'/>Religion</label>

    <label><input type='checkbox' name='cat_id[]' value='4'/>Chips</label>

    <label><input type='checkbox' name='cat_id[]' value='5'/>Drinks</label>

    <input type="submit" value="submit">

    </form>

    </html>

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.