Basically I have a client table and a leadlist for potential leads and I need to transfer the leads to the clients once they have been done, and delete them from the original table with an export button.
I've already tried a few possible things like select from CData ......
and insert into leadlist
, but it hasn't worked
My leadselect.php:
$(document).on('click', '.export', function(){
var user_id = $(this).attr("id");
if(confirm("Are you sure you want to export this?"))
{
$.ajax({
url:"export.php",
method:"POST",
data:{user_id:user_id},
success:function(data)
My export.php:
<<?php
include('db.php');
include("function.php");
insert into leadlist
select * from CData
?
button is defined as
$sub_array[] = '<button type="button" name="export" id="'.$row["id"].'" class="btn btn-warning btn-xs export">Export</button>';
My expected result is for it to export the row of data that I choose to the leadlist and delete it.
Could you please advise me how I can approach this requirement?
$_POST['user_id']
inexport.php
.leadlist
andCData
tables have the same columns?