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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:26:50+00:00 2026-06-18T02:26:50+00:00

Hello I generate my checkboxes using this way. $result = mysql_query(SELECT * FROM tbl_tourism_type

  • 0

Hello I generate my checkboxes using this way.

$result = mysql_query("SELECT * FROM tbl_tourism_type order by type_name ");
                $i=1;
                while($row = mysql_fetch_array($result)){
                echo '<input type="checkbox" name="type[]" value="'.$row['type_id'].'" id="'.$row['type_name'].'">'.'
                <label for="'.$row['type_name'].'" class="fil_lab">'.$row['type_name']. '</label>';
                if($i%5==0) 
                {
                 $i = 0;
                 echo '<br><br>';
                }
                $i++;}

Note that they will most likely generate 50+ checkboxes. Currently they are generated by 5 each then next line and the way they are set up they are inconsistent with one another and are hard on the eyes. Would anyone know how to fix this so that they would be properly structured?Link to screen shot

  • 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-18T02:26:51+00:00Added an answer on June 18, 2026 at 2:26 am

    Use CSS to give the checkbox a width and the label a width. That way they tale up the same amount of space.

    echo '<input type="checkbox" name="type[]" value="'.$row['type_id'].'" id="'.$row['type_name'].'" style="width: 20px;" />'.'
    <label for="'.$row['type_name'].'" class="fil_lab" style="width: 100px;">'.$row['type_name']. '</label>';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I run this: rails generate controller hello index it no doubt generates hello
Hello Stacked-Experts! My question: How to generate a string from a CLLocationDegrees value? Failed
Hello can anyone help me, i need to generate custom xml file from wordpress
Well hello! I'm using Umbraco 4 and trying to generate valid JSON. However, my
Hello I use malloc() to generate a buffer like this where buffer is a
Hello I am using maven2-xdoclet2-plugin to generate the hibernate mappings The config of xdoclet
we can see function generate() { this.a = 'hello'; } obj = new generate();
I need to generate a simple "Hello World" ELF32 executable using gcc . I
Hello I try to create a function to generate select functions. But the following
I have tried to generate Hello World with openxml sdk. To my surprise when

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.