how to retrive db using checkbox in php

September 27, 2010 at 22:39:41
Specs: Windows XP
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['title']. "</td>";
echo "<td>" . $row['author'] . "</td>";
echo "<td>" . $row['publisher'] . "</td>";
echo "<td>" . $row['edition'] . "</td>";
echo "<td>" . $row['prize'] . "</td>";
echo "<td>" . $row['category'] . "</td>";
echo "<td><input type='checkbox' name='check[]' value='Add to list' /></td>";
echo "</tr>";
}
echo "</table>";
}

$count = 0;
$no = $_POST['check'];
$N = count($no);
for($i=0; $i < $N; $i++)
{
$count = $count + $row['prize'];
}

echo "<input type='text' value='$count' name='text'>";


See More: how to retrive db using checkbox in php

Report •


#1
September 27, 2010 at 22:41:03
i want to extract and count totla prize value by checking checkbox

Report •
Related Solutions


Ask Question