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 = "

Welcome to Paid Survey Hub India!

Thank you for signing up. Please verify your email address by clicking the link below:

Verify Email Address

Or copy and paste this link: $verify_link

Best regards,
India Survey Guide Team

"; send_email($email, $email_subject, $email_message); $success = "Registration successful! Please check your email to verify your account."; } else { $error = "Registration failed. Please try again."; } } } } $page_title = 'Sign Up'; include 'includes/header.php'; ?>

Create Your Account

Already have an account? Login here