Im a new bie need your help soon. Thanks For Precious Time

What have you done?

commented: can help me out with code snippet +0

i want know how to get data from database using radio buttons. please help me out

i dnt hve idea how to fetch data from database using radio buttons

A downvote will not lead help, at least from me. I asked you to share what have you done or do I have to write your code without knowing what you really need?

Try to share your form, your receiving script, your query to the database table and maybe then we will be able to suggest you what to do.

$con = @mysql_connect('localhost', 'root', '');

    $con = @mysql_connect('localhost', 'root', ''); 
   if (!$con) { 
   die( '<p>Unable to connect to the ' . 
          'database server at this time.</p>' ); 
   } 

   // Select the database 
   if (! @mysql_select_db('cars', $con) ) { 
   die( '<p>Unable to locate the cars ' . 
          'database at this time.</p>' ); 
   } 

   { 
   $result = mysql_query('select * from cars'); //display the database results 
   while($row=mysql_fetch_row($result)) 
   { 
      $Cargroup=$row['Cargroup']; 
      $CarType=$row['CarType']; 
      $Rate=$row['Rate']; 
      $Fee=$row['Fee']; 


echo '<tr> 
        <td> 
         <input type="radio" name="vehicle" value="group"> 
        </td> 
        <td> 
         '.$row['Cargroup'].' 
        </td> 
        <td width="100%"> 
         '.$row['CarType'].' 
        </td> 
        <td> 
         '.$row['Rate'].' 
        </td> 
        <td> 
         '.$row['Fee'].' 
        </td> 
        <td> 
         '.$row['Fee'] + $row['Rate'].' 
        </td> 
     </tr>'; 
    }
    mysql_close($con);

?>

die( '<p>Unable to connect to the ' .

          'database server at this time.</p>' );  $con = @mysql_connect('localhost', 'root', ''); 
   if (!$con) { 
   die( '<p>Unable to connect to the ' . 
          'database server at this time.</p>' ); 
   } 

   // Select the database 
   if (! @mysql_select_db('cars', $con) ) { 
   die( '<p>Unable to locate the cars ' . 
          'database at this time.</p>' ); 
   } 

   { 
   $result = mysql_query('select * from cars'); //display the database results 
   while($row=mysql_fetch_row($result)) 
   { 
      $Cargroup=$row['Cargroup']; 
      $CarType=$row['CarType']; 
      $Rate=$row['Rate']; 
      $Fee=$row['Fee']; 


echo '<tr> 
        <td> 
         <input type="radio" name="vehicle" value="group"> 
        </td> 
        <td> 
         '.$row['Cargroup'].' 
        </td> 
        <td width="100%"> 
         '.$row['CarType'].' 
        </td> 
        <td> 
         '.$row['Rate'].' 
        </td> 
        <td> 
         '.$row['Fee'].' 
        </td> 
        <td> 
         '.$row['Fee'] + $row['Rate'].' 
        </td> 
     </tr>'; 
    }
    mysql_close($con);

?>
Member Avatar for diafol

OK:

1) Do not post multiple nonsense threads - somebody has to clean up your s***.
2) Post a meaningful question - read this - pritaeas' "Read This" for posting PHP related questions
3) Learn to press the right voting keys - thumb up = agree / I want help, thumb down = disagree / p*** off
4) Stop using deprecated code - mysql_* functions are dead. See DW Tutorial: Common Issues with MySQL and PHP
5) Only post your code once - I don't understand why you posted it twice. Copy and paste ain't that difficult.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.