I am trying to run the below code... HTML...signup.html
<div>
<label for="create-password">Create Password</label>
<input id="create-password" type="password" placeholder="Atleast 6 characters" name="password" required>
</div>
<div>
<label for="confirm-password">Confirm Password</label>
<input id="confirm-password" type="password" placeholder="Atleast 6 characters" name="confirmPassword" required>
</div>
PHP Part
$password = $_POST['password'];
$confirmPassword = $_POST['confirmPassword'];
if($password != $confirmPassword)
echo "Passwords do not match";
Whenever i try to run this it says
Notice: Undefined index: confirmPassword in E:\xampp\htdocs\Nishat's Web Design\signup_process.php on line 26 Passwords do not match
I dont understand why it is not considering the second input name = confirmPassword... If someone helps then it would be appreciateable