Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67441

radio button to get id and pass to next page

$
0
0

I am doning one page where the packages are listed from database with a radio button it needs to save packname and echo which pack is selected

Standard Packages

<?php
                echo "<table border='1'>";
                echo "<th>Select</th>";
                echo "<th>Package Name</th>";
                echo "<th>Service Type</th>";
                echo "<th>Service Name</th>";
                echo "<th>Sessions</th>";
                echo "<th>Price</th>";

                while($row = mysqli_fetch_array($sql))
                {
                  echo "<tr>";
                  $checked=isset($_POST["radio"]) && $_POST["radio"]==="oneway"?"checked":""; 
                  echo '<td><input type="radio" name="radio" id="oneway" value="oneway"<?php echo $checked;?></td>';
                  echo "<td>".$row['packname']."</td>";
                  echo "<td>".$row['ServiceType']."</td>";
                  echo "<td>".$row['ServiceName']."</td>";
                  echo "<td>".$row['Sessions']."</td>";
                  echo "<td>".$row['Price']."</td>";
                  echo "</tr>";
                 }                      


               echo "</table>";
               echo "</div>";
               mysqli_close ($db);
            ?>

            </table>

Viewing all articles
Browse latest Browse all 67441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>