Find the answer to your Linux question:
Results 1 to 2 of 2
hi i want to use checkbox in php. i have function for each check should be running when this box is selected.how i can do this....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    38

    checkbox in php


    hi
    i want to use checkbox in php. i have function for each check should be running when this box is selected.how i can do this.

  2. #2
    Just Joined! andriagutama's Avatar
    Join Date
    Jul 2008
    Location
    Batam, Indonesia
    Posts
    34
    Quote Originally Posted by shyma View Post
    hi
    i want to use checkbox in php. i have function for each check should be running when this box is selected.how i can do this.
    create 2 file for this.

    1.file index.html
    Code:
    <html>
    <form method='post' action='post.php' a>
    <input type='checkbox' name='one'>one
    <input type='checkbox' name='two'>two
    </form>
    </html>
    2.file post.php
    Code:
    <?php
    $one=$_POST['one'];
    $two=$_POST['two'];
    
    if($one)
    {
         /*call function one*/
    }
    if($two)
    {
         /*call function two*/
    }
    ?>

Posting Permissions

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