loren646 Posted March 17, 2013 Share Posted March 17, 2013 (edited) The price (i.e. "11", "2999", "4959") is outputted to a text box. The user will now change the price. When the "Update" button is pressed i want the all the prices to be to be changed to the new ones. I need to help on figuring out how to code the process page. <?php mysql_connect("localhost","user","password"); mysql_select_db("listing"); $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'> <tr> <th>Building</th> <th>Apartment #</th> <th>Price</th> <th># of Bedrooms</th> <th>Move in</th> <th>Rented</th> </tr>"; 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> <?php echo "<td>" . $row['bedroom'] . "</td>"; echo "<td>" . $row['movein'] . "</td>"; ?> <td><input type="checkbox" name="rent[]" value="yes"></td> <?php echo "</tr>"; } echo "</table>"; ?> <p><input type="submit" value="Update"><p> </form> <?php mysql_close(); ?> Edited March 23, 2013 by fenway code tags Link to comment https://forums.phpfreaks.com/topic/275783-updating-table-help-on-processing-page/ Share on other sites More sharing options...
fenway Posted March 23, 2013 Share Posted March 23, 2013 You already posted this topic -- I've removed the other once, since this is clearer. But I still don't understand -- are you asking us to write the update/POST steps? Link to comment https://forums.phpfreaks.com/topic/275783-updating-table-help-on-processing-page/#findComment-1420527 Share on other sites More sharing options...
fenway Posted March 23, 2013 Share Posted March 23, 2013 Double-post -- topic locked. Link to comment https://forums.phpfreaks.com/topic/275783-updating-table-help-on-processing-page/#findComment-1420528 Share on other sites More sharing options...
Recommended Posts