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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:29:17+00:00 2026-06-06T08:29:17+00:00

I have a html form <form action=process.php method=post> <input type=checkbox name=name[v1] /> <input type=checkbox

  • 0

I have a html form

<form action="process.php" method="post">

    <input type="checkbox" name="name[v1]"  />
    <input type="checkbox" name="name[v2]"  />
    <input type="checkbox" name="name[v3]"  />
    <input type="submit" name="update" value="update">
</form>

If they is only one check box is ticked then I only see that check box

Array
(
[\’v3\’] => on
)

If I have checked all three box then I see them all.

Array
(
    [\'v1\'] => on
    [\'v2\'] => on
    [\'v3\'] => on
)

Is they any way I can see all of my checkbox even if they are not checked.

process.php

foreach( $_POST['name'] as $k => $v )
{
   echo "key: ".$k;
}
  • 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-06T08:29:21+00:00Added an answer on June 6, 2026 at 8:29 am

    Checkboxes and radio buttons are not passed on to the processing script if they don’t have a “checked” attribute set. This is HTML4 by design.

    The only way you can set a state is using something like:

    if(!isset($_POST['mycheckbox'])){ $_POST['mycheckbox'] = 0; }
    

    or better yet:

    $_POST['mycheckbox'] = isset($_POST['checkbox']);
    

    Regarding radio buttons, you should only use the first version since radio buttons can have more than one value so instead of setting a TRUE/FALSE in them, you want to set a default value instead.

    Another note, DISABLED elements are not posted, even if they have a value, you will never see them, this is another design feature of HTML4+

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

Sidebar

Related Questions

I have an HTML form: <form action='process.php' method='post'> <input type='checkbox' name='check_box_1' /> Check me!<br>
HTML: <form method=post action=action=save&amp;id=239 id=save-form> <input type=text value=0 name=views /> <input type=submit value=save plz
I have this HTML: <form action='uploadhandle.php' method='POST' enctype=multipart/form-data> <input type='file' class='fileinput' id='photo1' name='photo1'> <input
I have an html input field, such as <form method=post action=process.php enctype=multipart/form-data> <div> <h3>Files:</h3>
I have the following HTML: </td><td> <div id=arrow></div> </td> <form method=POST action=index.php> <input type=hidden
Ok, I have index.html with a form as follows: <form action=process.php method=post> <table> <tr>
i have this html <ul> <li><form action=# name=formName></li> <li><input type=text name=someName /></li> <li><input type=text
I have a form with the following HTML below: <form id=course_edit_form name=course_form action=/courses/save method=post>
I created this form: <form method=post action=process-form.php id=emailForm name=emailForm target=_self> <h4>Sign up to be
I have a post html form, and the action is index.php, which is the

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.