Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3333026
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:45:04+00:00 2026-05-17T23:45:04+00:00

I have a form, and inside it there’s a while() with checkboxes. I wish

  • 0

I have a form, and inside it there’s a while() with checkboxes.

I wish to have so when you mark and then press submit, the message will remove.

Now, I have the checkboxes, and the submit button and so. Now all my checkboxes are like this:

   <input class="cbPick" name="cbPick" type="checkbox" value="<?php echo $id; ?>">

How can i work with that in PHP? Should i do, $_POST[“cbPick”] to know if its marked or not ?

And when i have more with these, how can i know which is which?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:45:05+00:00Added an answer on May 17, 2026 at 11:45 pm

    Check boxes require the use of an array. PHP will automatically place the checked boxes into an array if you place [] brackets at the end of each name.

    Please choose type of food:<br />
    Steak:<input type="checkbox" value="Steak" name="food[]">:<br />
    Pizza:<input type="checkbox" value="Pizza" name="food[]">:<br />
    Chicken:<input type="checkbox" value="Chicken" name="food[]">:<br />
    

    Then you can do

    $foodArray=$_POST['food'];
    echo $foodArray[0]; //Steak Value
    echo $foodArray[1]; //Pizza Value
    echo $foodArray[2]; //Chicken Value
    

    PS – This information was found by Googling “Checkboxes PHP” and clicking the first link. I encourage you to do at least a little research in the future before posting a question that has anwers so readily available.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form inside a while loop in PHP. There is action=javascript:block_grade($id), but
I have a form loading inside my page and there is a button out
Scenario I have a Windows Forms Application. Inside the main form there is a
Whether we can have a form inside another form?. Is there any problem with
I have a page with <form> tag. Inside a form there is a lot
I basically have a form inside of Flash that I need to submit to
I have a simple form and inside there are two input fields text type.
Simple, I have a GridPanel and a FormPanel. Inside the form there is a
I have a modal window with form inside it. There are two way user
I have a jsp which contains a html form. Inside it there is an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.