<?php
	require_once 'singles.php';
// new_invest
$stmt =$conn->prepare("INSERT INTO invest VALUE (?,?,?,?,?,?,?,?,?,?,?)");
 

$stmt->bind_param("sssssssssss",$id,
 $new_email,
 $new_icon,
 $new_plan,
 $new_amount,
 $new_profit,
 $new_period_remaining,
 $new_capital_back,
 $new_time,
 $created_at,
 $updated_at);
 

 
 
 // $stmt->close();
// $conn->close();



// new_trans
$stmt_trans =$conn->prepare("INSERT INTO trans VALUE (?,?,?,?,?,?,?,?,?,?,?,?)");
 

$stmt_trans->bind_param("ssssssssssss",$id,
 $new_trans_id,
 $new_description,
 $new_email,
 $new_amount,
 $new_fee,
 $new_status,
 $new_method,
 $new_type,
 $details,
 $created_at,
 $updated_at);
 

 
 
 // $stmt->close();
// $conn->close();



// new_send
$stmt_send =$conn->prepare("INSERT INTO send VALUE (?,?,?,?,?,?,?,?)");
 

$stmt_send->bind_param("ssssssss",
$send_id,
$new_send_email,
$new_send_from,
$new_send_to,
 $new_send_amount,
 $new_send_note,
 $created_at,
 $updated_at);
 
 

 
 
 // $stmt->close();
// $conn->close();



 //balance update 
 $stmt_update_my_bal1 = $conn->prepare("UPDATE info SET bal = ? WHERE email =?");
 $stmt_update_my_bal1->bind_param("ss",$d_new_bal1,$current_user_email);
 
 
 // $stmt->close();
// $conn->close();

 //Profit update 
 $stmt_update_my_profit1 = $conn->prepare("UPDATE info SET profit = ? WHERE email =?");
 $stmt_update_my_profit1->bind_param("ss",$d_new_profit1,$current_user_email);
 
 
 // $stmt->close();
// $conn->close();


//update front 1 
 $stmt_front = $conn->prepare("UPDATE info SET id_front = ?, id_front_name=? WHERE email =?");
 $stmt_front ->bind_param("sss",$front_file,$front_file_name,$current_user_email);

 // $stmt->close();
// $conn->close(); 
 
//update bacck 1 
 $stmt_back = $conn->prepare("UPDATE info SET id_back = ?, id_back_name=? WHERE email =?");
 $stmt_back ->bind_param("sss",$back_file,$back_file_name,$current_user_email);
 
  $stmt_kyc = $conn->prepare("UPDATE info SET kyc = ? WHERE email =?");
 $stmt_kyc ->bind_param("ss",$new_kyc_no,$current_user_email);



?>