View Full Version : Updating Mysql through Check Boxes

03-17-2013, 08:22 PM

Currently the value in rented is a 0. If the box is checked I want the value to be 1 when submit button is clicked. Not sure how to go about the update process page.


$result2 = mysql_query("SELECT *
FROM available
JOIN land
ON available.building = land.building
WHERE land.landlord = '$landlordselect'
ORDER by available.price ASC");

echo "<table border='1'>
<th>Apartment #</th>
<th># of Bedrooms</th>
<th>Move in</th>
while($row = mysql_fetch_array($result2))
echo "<tr>";
echo "<td>" . $row['building'] . "</td>";
echo "<td>" . $row['apt'] . "</td>";
<form action="processpage.php" method="post">
<td><input name="uprice[]" type="text" size="5" value="<?php echo( htmlspecialchars( $row['price'] ) ); ?>" /> </td>
echo "<td>" . $row['bedroom'] . "</td>";
echo "<td>" . $row['movein'] . "</td>"; ?>
<td><input type="checkbox" name="rent[]" value="yes"></td>
echo "</tr>";
echo "</table>";
<p><input type="submit" value="Update"><p>

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum