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 9220215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:17:45+00:00 2026-06-18T03:17:45+00:00

I have 80 checkboxes on my page ; these checkboxes belongs to some options

  • 0

I have 80 checkboxes on my page ; these checkboxes belongs to some options for product..

i store them like this

<input type="checkbox" name="options[]" value="<?php echo $row['value]?>"/>

DataBase Structure

**Product_id** | **Option_id**
     1                 16
     1                 45
     1                 68
     1                 78
     1                 80

the question is , how should i update options? when user go update page , user should able to see checked options and unchecked too.. How can i show checked options?

i store option values in database too , like this

**id** | **Option_id** |
   1         16
   2         45
   3         68
   4         78      
   ....
   ....
   80

Thank you very much for your help , sorry for my english..

Have a nice day

  • 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-06-18T03:17:46+00:00Added an answer on June 18, 2026 at 3:17 am

    To show them checked on the Front End

    Let’s say that you have the result of the product’s options in array called $checked

    while looping the checked to print them use this

    <input type="checkbox" name="options[]" value="<?php echo $row['value']?>" <?php if(in_array($row['value'], $checked)){ echo 'checked="checked"'; }?>/>
    

    For the update there is a lot of ways the simplest one is to

    Remove all the options and then add the new checked one

    Hope this will help

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

Sidebar

Related Questions

I have a web page which has 6 checkboxes on it. <input type=checkbox name=chk1
I have a page that contains multiple checkbox input elements. Toggling these alter the
If I have Checkboxes in page with IDs like below a_chk1, a_chk2, a_chk3, b_chk1,
He, I have this page where i have checkboxes next to every item in
I have a page with some checkboxes and a submit button. I use AJAX
I have 2 checkboxes in a form and onclick of these, some php code
I have a few asp:CheckBox's on my page. I'm using jQuery to hide some
I have these checkboxes on a page and on another page I have these
I have these three checkboxes and a button that connects to another page. When
I have some html checkboxes on a page and I need to verify that

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.