OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
quiz
/
assets
/
php
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/15/2025 11:20:33 AM
rwxr-xr-x
📁
PHPMailer
-
05/19/2025 10:07:16 AM
rwxr-xr-x
📄
checkEmailPhone.php
957 bytes
05/19/2025 10:07:16 AM
rw-r--r--
📄
check_user_exists.php
1.23 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
db_config.php
344 bytes
05/19/2025 10:07:16 AM
rw-r--r--
📄
function.php
1.04 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
loginCheck.php
1.16 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
mail.php
2.01 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
sendOTP.php
3.73 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
storeChildDetails.php
1.83 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
submitCandidateForm.php
2.29 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
submitCandidate_copy.php
2.14 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
submitParentForm.php
2.03 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
updateCandidateForm.php
1.53 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
updateCandidate_copy.php
2.34 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
validate.logged.php
1.31 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
validate_json.php
286 bytes
05/19/2025 10:07:16 AM
rw-r--r--
📄
verifyOtp.php
459 bytes
05/19/2025 10:07:16 AM
rw-r--r--
Editing: checkEmailPhone.php
Close
<?php // Assuming you have already connected to your database $email = $_POST['email']; $phone = $_POST['phone']; // Initialize response data $response = ['exists' => false, 'emailExists' => false, 'phoneExists' => false]; // Query to check if the email exists $queryEmail = "SELECT * FROM candidate WHERE email = ?"; $stmtEmail = $pdo->prepare($queryEmail); $stmtEmail->execute([$email]); $userEmail = $stmtEmail->fetch(); if ($userEmail) { // Email exists $response['exists'] = true; $response['emailExists'] = true; } // Query to check if the phone number exists $queryPhone = "SELECT * FROM candidate WHERE phone = ?"; $stmtPhone = $pdo->prepare($queryPhone); $stmtPhone->execute([$phone]); $userPhone = $stmtPhone->fetch(); if ($userPhone) { // Phone number exists $response['exists'] = true; $response['phoneExists'] = true; } // Return the response echo json_encode($response); ?>