Help with Script - Need to work with Check Boxes
Posted: Tue Nov 30, 2010 9:04 am
Hi All,
I am writing a Web Site that Reads some Data from a MySQL Database table and then shows it in a Table ina PHP Page. Once this data is displayed I want users to Tick boxes and then for the Page OR a Script to Read back in the Data that is ticked and then Write it to another Table in the SQL Database.
Here is the PHP To display the data from the First Table.
while($sSubject_row2 = mysql_fetch_array($result2))
{
if ($sSubject_row2['lilo'] == 'Outcome')
{
print'<tr><td>' .$sSubject_row2['UnitNumber'].'</td><td>'.$sSubject_row2['UnitName'].'</td><td>'.$sSubject_row2['lilo'].'</td><td>'.$sSubject_row2['Content'].'</td><td><input type="checkbox" name="check" id="check1"></td>';
}
}
Im just not quite sure how to write a script with Tick boxes and more than on tick box that may or may not be ticked.
Can someone please help me solve this issue.
Cheers
I am writing a Web Site that Reads some Data from a MySQL Database table and then shows it in a Table ina PHP Page. Once this data is displayed I want users to Tick boxes and then for the Page OR a Script to Read back in the Data that is ticked and then Write it to another Table in the SQL Database.
Here is the PHP To display the data from the First Table.
while($sSubject_row2 = mysql_fetch_array($result2))
{
if ($sSubject_row2['lilo'] == 'Outcome')
{
print'<tr><td>' .$sSubject_row2['UnitNumber'].'</td><td>'.$sSubject_row2['UnitName'].'</td><td>'.$sSubject_row2['lilo'].'</td><td>'.$sSubject_row2['Content'].'</td><td><input type="checkbox" name="check" id="check1"></td>';
}
}
Im just not quite sure how to write a script with Tick boxes and more than on tick box that may or may not be ticked.
Can someone please help me solve this issue.
Cheers