From 1860d3a2219d55c278e293427eb59875d13ade29 Mon Sep 17 00:00:00 2001 From: saras-69 <115482884+saras-69@users.noreply.github.com> Date: Mon, 4 Nov 2024 01:43:50 +0530 Subject: [PATCH] . --- forgotPassword.html | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/forgotPassword.html b/forgotPassword.html index 747feb9a..500c994e 100644 --- a/forgotPassword.html +++ b/forgotPassword.html @@ -49,7 +49,6 @@ display: flex; justify-content: center; align-items: center; - padding: 20px; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); @@ -127,7 +126,7 @@

Forgot Password

- +
@@ -156,8 +155,31 @@

Forgot Password

return; } + // Prepare data for backend integration + const data = { + email: recoveryEmail + }; + // Implement your password recovery logic here - alert("Password recovery link has been sent to your email address"); + fetch('YOUR_BACKEND_ENDPOINT', { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(data) + }) + .then(response => response.json()) + .then(data => { + if (data.success) { + alert("Password recovery link has been sent to your email address"); + } else { + alert("An error occurred. Please try again."); + } + }) + .catch((error) => { + console.error('Error:', error); + alert("An error occurred. Please try again."); + }); }); function validateEmail(email) {