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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:49:31+00:00 2026-06-01T03:49:31+00:00

I have a form which allow users to choose the type of permit they

  • 0

I have a form which allow users to choose the type of permit they wish to apply for. There are 3 types of permit class and 8 categories of permit type.

Please take a look at this screenshot for better understanding: https://i.stack.imgur.com/mRC9O.jpg

For the classes, users can only choose 1. but for the categories users can apply multiple or single.

Users can choose 2 categories but 0 classes. Likewise users can choose 1 class and 0 categories. But user must at least choose something out of the 11 options.

Eg. User apply for Class 1 only OR User apply for CAT 2TT and CAT 3PG.

The coding to my form:

  <div class="contents">
  <form id="applicationoptions" method="post" action="s_apply_now.php">
  <div id="optionshead">Class :</div>
      <div id="classoptions">
          <input type="radio" name="class" value="1" /> Class 1 Permit             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="radio" name="class" value="2" /> Class 2 Permit &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="radio" name="class" value="3" /> Class 3 Permit
      </div>
  <div id="optionshead2">Categories :</div>
      <div id="catoptions">
          <input type="checkbox" name="cat" value="1" /> CAT 2PG &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="checkbox" name="cat" value="2" /> CAT 1OR &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="checkbox" name="cat" value="3" /> CAT 2TT <br/><br/>
          <input type="checkbox" name="cat" value="4" /> CAT 3PG &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="checkbox" name="cat" value="5" /> CAT 2OR &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="checkbox" name="cat" value="6" /> CAT 3TT <br/><br/>
          <input type="checkbox" name="cat" value="7" /> CAT 4PG &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="checkbox" name="cat" value="8" /> CAT 3OR
      </div>
  <div class="applynext">
 <input class="applynextbutton" type="submit" name="applynextbutton" value="PROCEED" />
 </div>
  </form>
  </div>

After user checked their selection, the system will then separate the selections and store them in the database.

The database schema:
permit (PID, EID, PTYPE, STATUS, MID, HRID)

If user did not choose anything, the system will alert them and ask them to choose something

If user choose more than 2 class, the system will warn alert them to choose only 1 class.

What do you guys think? Is PHP able to allow me to accomplish these intentions?

P.S.: Please tell me how can I make spaces without using too many &npsb;. Is there a way to change the radio button to checkbox and disable the multiple selection?

Guys…I have a problem…how do I in php to retrieve data from checkbox?? any example??
i tried array[] it but can’t seem to work..

  • 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-01T03:49:33+00:00Added an answer on June 1, 2026 at 3:49 am

    Yes PHP will work. You can get the necessary data posted via the $_POST collection, and communicate with whatever database you’re using to store them.

    For spacing, I suggest learning CSS and avoid adding lots of non-breaking spaces.

    As far as handling the checkbox values, it looks like you want to allow the user to select multiple values corresponding to one name (class, and cat). As you have it, PHP will just end up with the last value they selected. You can modify the name of your form inputs to cause PHP to treat them like an array on the backend. Then when you grab $_POST[‘class’] you will get an array.

    <input type="checkbox" name="class[]" value="1" /> First class
    <input type="checkbox" name="class[]" value="2" /> Second class
    

    If both of those are checked by the user, you would see this in PHP

    $classes = $_POST['class'];
    // array(1, 2)
    

    If they only checked one, you would have just one element in the array.

    You can even make it an associative array if having keys in your array make it easier to handle the data:

    <input type="checkbox" name="class[first]" value="1" /> First class
    <input type="checkbox" name="class[second]" value="2" /> Second class
    

    and in PHP

    $classes = $_POST['class'];
    // array('first'=>1, 'second'=>2)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form in which I allow logged in users to change their
I have a form which POST's its data via AJAX: $.ajax({ type: POST, url:
In my web application I have created a form that will allow users to
I have a form that allow users to upload files, I however need to
I have a form in my app and I would like to allow users
I have a form with three sections, and I want to allow the users
I have a web page which allow users to compose news articles. It has
I have a HTML form which allows a user to add rows ad hoc
I have this form which allows the input of any product quantity from 1-10:
I have a form which I want to be 'resusable' for a variety of

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.