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: check_user_exists.php
Close
<?php header('Content-Type: application/json'); require('db_config.php'); $email = $_POST['email']; $mobile = $_POST['mobile']; // Initialize variables for the results $emailExists = false; $mobileExists = false; // Check if email exists $emailExistsQuery = "SELECT COUNT(*) FROM candidate WHERE email = ?"; $stmt = $conn->prepare($emailExistsQuery); if ($stmt) { $stmt->bind_param('s', $email); $stmt->execute(); $stmt->bind_result($emailCount); $stmt->fetch(); $stmt->close(); $emailExists = $emailCount > 0; // If count > 0, email exists } else { echo json_encode(['error' => 'Email query failed']); exit; } // Check if mobile exists $mobileExistsQuery = "SELECT COUNT(*) FROM candidate WHERE mobile = ?"; $stmt = $conn->prepare($mobileExistsQuery); if ($stmt) { $stmt->bind_param('s', $mobile); $stmt->execute(); $stmt->bind_result($mobileCount); $stmt->fetch(); $stmt->close(); $mobileExists = $mobileCount > 0; // If count > 0, mobile exists } else { echo json_encode(['error' => 'Mobile query failed']); exit; } // Return JSON response echo json_encode([ 'emailExists' => $emailExists, 'mobileExists' => $mobileExists ]); ?>