class Index_model extends MY_Model {
protected $user_id=array();
private $last_id;
public function __construct(){
$this->load->database();
$this->_table='profiles';
}
public function insert_step_1($spram) {
$firt_name= $this->session->userdata('first_name');
if($first_name == '' || $last_name == '' || $relationship_to_senior == '' || $email == '' || $insurance == '' ||
$price_range == '' || $if_insurance == '' || $facility_placement == '' || $location == '' || $telephone == '')
{}
else
{ $insert_data = array ('first_name' => $first_name, 'last_name' => $last_name, 'relationship_to_senior' => $relationship_to_senior, 'email' => $email, 'insurance' => $insurance, 'price_range' => $price_range, 'if_insurance' => $if_insurance, 'facility_placement' => $facility_placement, 'location' => $location,'telephone'=>$telephone);
$this->db->insert ( 'default_leads_forms', $insert_data );
$this->last_id = $this->db->insert_id();
$this->session->set_userdata('tmp_last_id',$this->last_id);
}
}
public function addLeads_duplicate($spram){
$var = $this->session->userdata('tmp_last_id',$this->last_id);
print_r($var);
//$this->db->insert('default_leads_duplicate',$spram);
foreach ($spram as $row) {
$user_id=array(
'user_id'=>$row['user_id'], );
$this->db->where('id',$id);
$res=$this->db->get('default_leads_forms');
$result=$res->result_array();enter code here
}
sallaudin 0 Newbie Poster
cereal 1,524 Nearly a Senior Poster Featured Poster
veedeoo 474 Junior Poster Featured Poster
iamthwee
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.