in my code I have 2 forms with 2 actions (one designed for changing password details and one designed for changing the customer name). When the button is clicked the form submits the data to my UpdateCustomer.php page which handles the SQL statements.
<ul>
//this form action works
<form action="Functions/Customer/UpdateCustomer.php" form name="CustomerDetails" method="post">
<li><label for="Name">Name</label>
<input type="text" name="updateName" value="<?php echo $row_Customers['Customer_Name'] ?>" style='width:300px;'/><button>Update</button></li>
</form>
<br />
//this form action doesn't
<form action="Functions/Customer/UpdateCustomer.php" form name="ChangePassword" onSubmit="return validateForm()" method="post">
<div class="pass" ><label for="password">Password</label>
<input type="password" name="updatePassword" id="updatePassword" value="" style='width:300px;'/></div>
<div class="pass" ><label for="confirmPassword">Confirm Password</label>
<input type="password" name="confirmPassword" value="" style='width:300px;'/><button>Change Password</button></div>
</form>
</ul>
my UpdateCustomer.php then retrieves these variables:
$Name = $_POST['updateName'];
$Password = $POST['updatePassword'];
when I do an echo on $Name if I have submitted the CustomerDetails form, it shows the name that was entered but when I do an echo on $Password after submitting the ChangePassword form, I get no value.
Any help is much appreciated!
thanks