All,
I am displaying information from a MySQL database in table form. One of the columns will contain two radio buttons for “Reviewed” and “Resolved.” The user will select (or not) one of the two options for one or more rows. On form submission, I will need to update the database accordingly.
I have successfully placed the radio buttons, but cannot get them to work correctly. If I give the options the same name with the record ID then the table works correctly, but it does not carry information over into my submission script. If I remove the record ID from the button name then the information carries over correctly, but the table does not work.
I’m new to using radio buttons with PHP, so forgive me if I’m asking a routine questions here.
Testopen.php:
[php]
<?php session_start(); if( $_SESSION['user_level']=='superadmin'){ include 'RemoveBlank.php'; ?><style type="text/css">
table.inet td { width: auto; }
.container { text-align: left; }
table.inet thead {
background-color: black;
color: white;
text-indent: 14px;
text-align: left;
}
table.inet tbody tr:nth-child(odd) { background-color: rgba(51, 204, 255, 0.6); }
table.inet tbody tr:nth-child(even) { background-color: rgba(51, 255, 102, 0.3); }
table.bridge td { width: auto; }
.container { text-align: left; }
table.bridge thead {
background-color: black;
color: white;
text-indent: 14px;
text-align: left;
}
table.bridge tbody tr:nth-child(odd) { background-color: rgba(255, 204, 204, 0.6); }
table.bridge tbody tr:nth-child(even) { background-color: rgba(143, 255, 255, 0.3); }
New Issues
Internet Speeds
computerName | ExpectedRig | timestamp | download | upload | latency | jitter | testServer | ip_address | hostname | Issue Created | Update Status | <?php mysql_connect('localhost','root','admin'); $query=("SELECT * FROM speedtest.data WHERE issuecreated = 'New' ORDER by ID DESC"); $result=mysql_query($query); $num=mysql_numrows($result); $i=0; while ($i < $num) {
<?php echo $ComputerName; ?> | <?php echo $ExpectedRig; ?> | <?php echo $Timestamp; ?> | <?php echo $download; ?> | <?php echo $upload; ?> | <?php echo $latency; ?> | <?php echo $jitter; ?> | <?php echo $testServer; ?> | <?php echo $ip_address; ?> | <?php echo $hostname; ?> | <?php echo $issuecreated; ?> |
Reviewed
Resolved
|
Bridges
<?php // database connection info mysql_connect('localhost','***','***'); $query=("SELECT * FROM speedtest.bridges WHERE issuecreated = 'New' ORDER by ReportID DESC"); $result=mysql_query($query); $num=mysql_numrows($result); $i=0; ?>computerName | ExpectedRig | timestamp | MAC | Signal | TxRxMbps | CCQ | ConnectionTime | Last IP | Issue Created | Actions |
<?php echo $ComputerName; ?> | <?php echo $ExpectedRig; ?> | <?php echo $Timestamp; ?> | <?php echo $MAC; ?> | <?php echo $Signal; ?> | <?php echo $TxRxMbps; ?> | <?php echo $CCQ; ?> | <?php echo $ConnectionTime; ?> | <?php echo $LastIP; ?> | <?php echo $issuecreated; ?> | <?php echo " |
[/php]
For the time being, I have a simple script on my submission page, just so I can see the data before I do anything with it.
[php]mass review test
<?php if(count($_POST) > 0){ $update = $_POST['update']; echo $update; } ?>What did I say about clicking these buttons?[/php]