query($check_sql); if ($result->num_rows > 0) { $error = "Email already registered"; } else { // Hash password and create verification token $hashed_password = password_hash($password, PASSWORD_DEFAULT); $verification_token = bin2hex(random_bytes(32)); // Insert member $sql = "INSERT INTO members (full_name, email, phone, password, verification_token) VALUES ('$full_name', '$email', '$phone', '$hashed_password', '$verification_token')"; if ($conn->query($sql)) { // Send verification email $verify_link = SITE_URL . "/verify-email.php?token=" . $verification_token; $email_subject = "Verify Your Email - India Survey Guide"; $email_message = "
Thank you for signing up. Please verify your email address by clicking the link below:
Or copy and paste this link: $verify_link
Best regards,
India Survey Guide Team
Already have an account? Login here