473,385 Members | 1,317 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

radio buttons

Expand|Select|Wrap|Line Numbers
  1. <html>
  2.  
  3. <head>
  4. </head>
  5. <script language=javascript>
  6. </script>
  7. <body>
  8. <form name="UserDetails" method="post" action="">
  9.  
  10.  <table align=center border=0 cellpadding=2 cellspacing=2>
  11.    <tr>
  12.      <td><font face="Garamond" size=3>
  13.                 <b>UserDetails:</b>
  14.                 </font></td>
  15.                 <td> <font face="Garamond" size=12><b>
  16.                                  &nbsp;<input id=Add  type=button value=Add name=Add></td>
  17.                 <td> <font face="Garamond" size=12><b>
  18.                                  &nbsp;<input id=Edit  type=button value=Edit name=Edit></td>
  19.  
  20.                      <td> <font face="Garamond" size=12><b>
  21.                      &nbsp;<input id="submit"  type="submit" value="Submit" name="submit">
  22. </tr></table>
  23.  
  24.          $dbconnect = pg_connect("host=10.10.2.12 dbname=punch_system user=postgres password=postgres")
  25.                                 or die ("Could not Connect to Server");
  26.  
  27.         if($_REQUEST['submit'] == "Submit")
  28.         {
  29.  
  30.  
  31.         $query="select pmt19_emp_code,pmt19_user_role,pmt19_activatedon,pmt06_emp_code,pmt06_emp_name,
  32.                 pmt06_desg_code,pmt12_desg_code,pmt12_desg_desc from pmt_web_users,pmt_employee,
  33.                 pmt_designation where pmt19_emp_code=pmt06_emp_code  and pmt06_desg_code=pmt12_desg_code";
  34.  
  35.  
  36.                 $rs = pg_query($query) or die ("Could not Open Records") . pg_last_error();
  37.  
  38.          echo "<table border=2 align=center>";
  39.         echo "<tr>";
  40.         echo "<th>S.No</th>" ;
  41.         echo "<th>Code</th>";
  42.         echo "<th>Name</th>";
  43.         echo "<th>Designation</th>";
  44.         echo "<th>Role</th>";
  45.         echo "<th>ActivationOn</th>";
  46.         echo "</tr>";
  47.  
  48.  
  49.              $count=1;
  50.               while($row=pg_fetch_row($rs))
  51.                 {
  52.                          echo"<tr>";
  53.           echo "<td input type=radio name=radio1 id=radio1>";echo $count; echo" </td>";
  54.                                 echo "<td>"; echo $row[0]; echo"</td>";
  55.                                 echo "<td align=center>"; echo $row[4]; echo "</td>";
  56.                                 echo "<td>"; echo $row[7]; echo "</td>";
  57.                                 echo "<td align=center>"; echo $row[1]; echo "</td>";
  58.                                 echo "<td>"; echo $row[2]; echo "</td>";
  59.                           echo"</tr>";
  60.                 $count++;
  61.                 }
  62.                 pg_free_result($rs);
  63.                 pg_close($dbconnect);
  64. }
  65.  
  66. ?>
  67. </table>
  68. </form>
  69. </body>
  70. </html>
  71.  
pls,any one help
how to put radio buttons to the serial numbers in the above program
Jul 20 '09 #1
1 1486
dlite922
1,584 Expert 1GB
where do you want to put radio buttons?

just use input type="radio", the value, and name it something. Usually radio buttons have the same 'name' then the user can only choose one. I assume this is what you want.


Dan
Jul 20 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Oscar Monteiro | last post by:
I Have to sets of Radio buttons like so: <input type="radio" name=p1 value=1> <input type="radio" name=p1 value=2> <input type="radio" name=p1 value=3> <br> <input type="radio" name=p2 value=1>...
6
by: Craig Keightley | last post by:
I have a page that has n number of radio groups (yes/No) how can i prevent the form being submitted if more than one radio group is not selected? By default all radio groups are unchecked ...
2
by: James P. | last post by:
Help, I need to display radio buttons on a form. The data is from SQL table: each row in each table is displayed as a radio button. I have multiple SQL tables so I understand I need to put...
1
by: kenny8787 | last post by:
Hi, can anyone help here? I have the following code generated from a database, I want to have javascript calculate the costs of the selected items using radio buttons, subtotal the costs and...
2
by: dpazza | last post by:
Hi, I'm creating a quiz on using a form in VB 2005 express. I have four sets of questions and answers (labels and radio buttons) and I change between which set of questions is currently shown on...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.