<?php
require 'db.php'; // Your database connection file
session_start();

$user_id = $_SESSION['user_id']; // Assuming the user is logged in
$leadsleap_user_id = $_POST['leadsleap_user_id'];
$leadsleap_list_id = $_POST['leadsleap_list_id'];

$stmt = $pdo->prepare("UPDATE users SET leadsleap_user_id = ?, leadsleap_list_id = ? WHERE id = ?");
$stmt->execute([$leadsleap_user_id, $leadsleap_list_id, $user_id]);

header("Location: profile.php?success=1"); // Redirect back with success message
exit;
?>
