Hi, I have this script that displays a record for me to edit.
As you can see it gets the customerID and displays the record according to that.
At the most I have 10 records and would like it so it displays all the records that I have then I can just changed them all at once then click the save button which will save the multiple changes. How can I edit this script to enable me to do that? thanks
<?php
require_once('common.php');
$customerID = $_GET['customerID'];
$customerID = htmlspecialchars($customerID);
$sql = "select customerID, customerName, custDiscCode from customer where customerID='$customerID'";
dbconnect();
$customerresult = mysql_query($sql);
$rsCustomer = mysql_fetch_array($customerresult);
echo xhtmlheader('Edit Customer '.$rsCustomer['customerName'] );
?>
<body>
<h1>Editing Customer <?php echo $rsCustomer['customerName'] ?></h1>
<form name="editCustomer" action="updateCustomer.php" method="get">
<table border="1" cellpadding="5" cellspacing="0">
<?php
echo "<tr><td>CustomerCode</td><td>".$rsCustomer['customerID'];
echo "<input type=\"hidden\" name=\"customerID\" value=\"".$rsCustomer['customerID']."\" /></td></tr>";
echo "<tr><td>Customer Name</td><td><input name=\"customerName\" value=\"".$rsCustomer['customerName']."\" /></td></tr>";
echo "<tr><td>Customer Disc</td><td><input name=\"custDiscCode\" value=\"".$rsCustomer['custDiscCode']."\" /></td></tr>";
?>
<tr><td>Click to Save</td><td><input type="submit" name="savebutton" value="Save" /></td></tr>
</form>
</table>