I have a form that has 5 text fields for a CustomerID, CustomerSurname, CustomerFirstName, CustomerAddress and CustomerTelephoneNumber. under the heading of old customer details. Then below that on the same form under the heading Enter the new customer details, I have the same text fields in which to enter the new customers details. So what I need to do with the php code is take those old details that have been entered in the text fields and update them in the database with the details entered in the second lot of text fields that are under the new customer details heading. So what I imagine to happen is the program looks at the form say right old customer details are here, lets update in the MySql database those old details with the second lot of details on this form.
The code for the form looks like
Code: Select all
<html>
<head>
<title> Industial Fasteners </title>
</head>
<body>
<h1> Update Customer Details Form </hl>
<h2> Please enter the customers old details</h2>
<form action="Update.php" method="post">
<table>
<tr>
<td>CustomerNumber:
<td><input type="text" name="CustomerNumber" />
</tr>
<tr>
<td>CustomerSurname:
<td><input type="text" name="CustomerSurname" />
</tr>
<tr>
<td>CustomerFirstName:
<td><input type="text" name="CustomerFirstName" />
</tr>
<tr>
<td>CustomerAddress:
<td><input type="text" name="CustomerAddress" />
</tr>
<tr>
<td>CustomerTelephoneNumber:
<td><input type="text" name="CustomerTelephoneNumber" />
</tr>
</table>
<h2> Please enter the new customer details</h2>
<form action="Update.php" method="post">
<table>
<tr>
<td>CustomerNumber:
<td><input type="text" name="CustomerNumber" />
</tr>
<tr>
<td>CustomerSurname:
<td><input type="text" name="CustomerSurname" />
</tr>
<tr>
<td>CustomerFirstName:
<td><input type="text" name="CustomerFirstName" />
</tr>
<tr>
<td>CustomerAddress:
<td><input type="text" name="CustomerAddress" />
</tr>
<tr>
<td>CustomerTelephoneNumber:
<td><input type="text" name="CustomerTelephoneNumber" />
</tr>
</table>
</form>
</body>
</html>.