diff --git a/employerprofile.php b/employerprofile.php index cb5bb71..6b4992d 100644 --- a/employerprofile.php +++ b/employerprofile.php @@ -53,7 +53,7 @@ if ($result->num_rows > 0) {

Employer Profile

-
+
- +
- + +
@@ -147,5 +144,6 @@ if ($result->num_rows > 0) {
+ \ No newline at end of file diff --git a/jobseekerprofile.php b/jobseekerprofile.php index b3b0d9f..eb21f03 100644 --- a/jobseekerprofile.php +++ b/jobseekerprofile.php @@ -35,14 +35,15 @@ $result = $stmt->get_result(); // Check if the user data was found if ($result->num_rows > 0) { $user = $result->fetch_assoc(); - + } else { - + $user = []; // Set $user to an empty array to avoid errors } ?> + @@ -50,6 +51,7 @@ if ($result->num_rows > 0) { + @@ -57,20 +59,16 @@ if ($result->num_rows > 0) {

Jobseeker Profile

- - + +
- +
@@ -78,13 +76,9 @@ if ($result->num_rows > 0) { - +
@@ -92,13 +86,9 @@ if ($result->num_rows > 0) { - +
@@ -106,13 +96,9 @@ if ($result->num_rows > 0) { - + @@ -120,13 +106,10 @@ if ($result->num_rows > 0) { - + + @@ -134,13 +117,9 @@ if ($result->num_rows > 0) { - + @@ -148,11 +127,8 @@ if ($result->num_rows > 0) { - + @@ -160,11 +136,8 @@ if ($result->num_rows > 0) { - + @@ -172,11 +145,8 @@ if ($result->num_rows > 0) { - + @@ -189,5 +159,9 @@ if ($result->num_rows > 0) { + + + + \ No newline at end of file diff --git a/phonevalidation.js b/phonevalidation.js new file mode 100644 index 0000000..b490faf --- /dev/null +++ b/phonevalidation.js @@ -0,0 +1,20 @@ +function validateForm() { + const phoneInput = document.getElementById('phone'); + const contactError = document.getElementById('contact-error'); + let isValid = true; + + // Clear any previous error messages + contactError.textContent = ""; + + // Validate Phone Number + const phoneCriteria = /^\d{10}$/; // Ensure exactly 10 digits + if (!phoneCriteria.test(phoneInput.value)) { + contactError.textContent = "Phone number must be exactly 10 digits."; + phoneInput.classList.add("border-red-500"); // Add red border if invalid + isValid = false; + } else { + phoneInput.classList.remove("border-red-500"); // Remove red border if valid + } + + return isValid; // Return false to prevent submission if validation fails +} \ No newline at end of file