Welcome Guest, Not a member yet? Register   Sign In
how to send mail to selected email by checkbox
#1

[eluser]prabhatshishodia[/eluser]
i have list of mail and i place check box in front of these mail how to send mail only selected mail by checkbox selection .explain me how these contacts send controller model .i m new with codeigniter .
#2

[eluser]umefarooq[/eluser]
for this you have to create array of check boxes and value would be id if data store in a database table when you click on submit and you will get only checked value use a loop to find email for that id from table and then send email

Code:
<input type="checkbox" name="cb[]" value="1" />
<input type="checkbox" name="cb[]" value="2" />
<input type="checkbox" name="cb[]" value="3" />

  in controller

$ids =  $this->input->get_post('cb');
   if(!empty($ids)){
     foreach($ids as $id){
        // get email id from database or directly give email address to check box value
    }
  }
#3

[eluser]prabhatshishodia[/eluser]
thanks for reply




Theme © iAndrew 2016 - Forum software by © MyBB