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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:25:41+00:00 2026-06-03T16:25:41+00:00

I am creating radiobuttons in HTML .I am getting data from SQL Database.I am

  • 0

I am creating radiobuttons in HTML .I am getting data from SQL Database.I am creating an attendence form in which there will be student name,Present Radio button ,Absent Radio button.
I put the Present and Absent Radio button in a single Group,(so that only one could be clicked.The problem is that I can’t create more than one radio group..My code is

<html>
<tr>
<td><?php echo $i;?></td> // Serial Number
<td> <label><?php echo $att['std_name'];?></label></td> //student name
<td><input type="radio" name="std_r[]" id="std_r[]"></td> // for present
<td><input type="radio" name="std_r[]" id="std_c[]"></td> // for absent
<td><input type="hidden" value="<?php echo $att['rollnum'];?>" > </td> //hidden field that will take roll number of student on next page

</tr>
</html>
<?php

I want that for each student there should be seperate group of radio buttons.thats why i want to create buttons with different name.
Anyone who can help me with 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-03T16:25:45+00:00Added an answer on June 3, 2026 at 4:25 pm

    I guess what you are asking is there are several students in the same page and each student with his own present/absent option.

    You should do something like this:

    <input type="radio" name="test[1]" value="present" />
    <input type="radio" name="test[1]" value="absent" />
    
    <input type="radio" name="test[2]" value="present" />
    <input type="radio" name="test[2]" value="absent" />
    
    <input type="radio" name="test[3]" value="present" />
    <input type="radio" name="test[3]" value="absent" />
    

    You may also specific the student_id as index, this will be easier for you do handle in PHP:

    <input type="radio" name="test[33888]" value="present" />
    <input type="radio" name="test[33888]" value="absent" />
    
    <input type="radio" name="test[90909]" value="present" />
    <input type="radio" name="test[90909]" value="absent" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating an ASP.NET application in which the administrator of the program will
Creating a server-side socket will fail if I'm trying to use the same port
When creating a new service in a WCF service project, Visual Studio will automatically
I am creating a small window to get a single input from user. For
i have a table name preferences under this there are multiple columns but i
I'm creating an android application, which has a particular screen (layout) with over (120+
Hi I am creating dynamic div elements , let say 4 div are there
I have an array of radio button from where i am creating radio buttons
I am creating a form with both radio buttons and checkboxes. I want to
I am creating a summary view of Microsoft InfoPath form(s) using a custom XSLT

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.