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

  • Home
  • SEARCH
  • 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 8575657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:44:35+00:00 2026-06-11T19:44:35+00:00

I have following checkbox arrays in html form <label><input name=columns[] type=checkbox value=pname />Property Name</label>

  • 0

I have following checkbox arrays in html form

<label><input name="columns[]" type="checkbox" value="pname" />Property Name</label>
<label><input name="columns[]" type="checkbox" value="2000" />Price</label>
<label><input name="columns[]" type="checkbox" value="New Road" />Location</label>
<label><input name="columns[]" type="checkbox" value="Joe Smith" />Owner</label>

there are about 30 such checkboxes.

All i want to do is sending the text along with its value of the checked box while form is posted. Lets say if i checked first checkbox, I want to send pname along with text Property Name. There can be several solutions for this, but don’t know which one will be easier one.

The one I thought is. In submit page iterating through the loop of checkbox array, create another array and Push the text manually to this new array.

Or other option I have thought is, in value attribute I will send text with value like this pname^Property Name and in submit page i iterate through loop, explode the value and put them to respective arrays.

Is there any alternative solution for this?

Thanks

  • 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-11T19:44:36+00:00Added an answer on June 11, 2026 at 7:44 pm

    HTML

    <label><input name="columns['Property Name']" type="checkbox" value="pname" />Property Name</label>
    <label><input name="columns['Price']" type="checkbox" value="2000" />Price</label>
    <label><input name="columns['Location']" type="checkbox" value="New Road" />Location</label>
    <label><input name="columns['Owner']" type="checkbox" value="Joe Smith" />Owner</label>
    

    PHP

    $columns = $_GET["columns"]; // or $_POST
    
    echo $columns["Property Name"] ;   // pname
    echo $columns["Price"] ;           // 2000
    echo $columns["Location"] ;        // New Orad
    echo $columns["Owner"] ;           // Joe Smith
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following HTML: <label><input type=checkbox value=12 name=Cevent[] /> Yoga</label> <label><input type=checkbox value=12 name=Cevent[]
I have the following code: HTML <div id='foo'> <input type='checkbox' value='english' name='bar[english]' /> <input
Suppose I have the following HTML: <form id=myform> <input type='checkbox' name='foo[]'/> Check 1<br/> <input
I have the following HTML: <form name=smform id=smform method=post action=> <input type=checkbox name=Check_All onClick=Check(document.smform.check)
I have a HTML snippet like the following <tr class=new> <td> <input name=id type=checkbox/>
I have the following checkbox created by a loop: <input type='checkbox' value=0 name='<?php echo
I have following structure for check-boxes <input type=checkbox name=reg_field['first_name'] value=1 /> First Name<br />
Say I have the following checkbox: <input type=checkbox value=1-25 /> To get the two
Hi I have the following page: <input type=checkbox name=fruit1 id=1 class=box>Banana<br /><br /> <input
I have the following form: <form name="quickAdd" action="" method="post" onsubmit="return quickAddProcess(this);"> <input type="hidden" name="quickAddFields[module]"

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.