I am using a checkbox with each result and allotting an id of the record I am getting form the database.
like this:
PHP Code:
<input type="checkbox" name="check1[]" value="<?=$row_c['biz_id']?>" onClick=""/> //there are some other things also here as biz name and biz email....
Now I want to took all the checked records in my mail function..........
__________________ » Please login or register to view this content. Registration is FREE - Interactive maps for websites » Please login or register to view this content. Registration is FREE for web developers
Since mail() accepts only $to, $subject and $message arguments (and headers), you should first combine your checked records into a text and then pass it to mail function as a whole. In your case the checked box should be accessible as $_POST['check1'][0].
after checking the checkbox and submitting the form, loop through the array $_POST['checkbox1'] using any of the array functions such as foreach ( $checkbox as $rec) and at each loop include the current record in your mail function. hopes it helps.
« Reply to Send Sms and Send email function...in php.