Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $html .= '<form id="status_form">';
- foreach ($leads as $key => $type) {
- $html .= '<input type="checkbox" name"' . $key . '" id="' . $key . '" class="box_status" value="1"';
- if (something = true) {
- $html .= ' checked="checked"';
- }
- $html .= ' />';
- $html .= '<label class="checkbox-inline" for"' . $key . '">' . $type . ' (' . @$count[$key] . ')</label>';
- }
- $html .= '</form>';
- echo $html;
- function update_report() {
- var form_data = $("#status_form").serialize();
- $.ajax({
- type: 'POST',
- url: 'scripts/test.php',
- data: form_data,
- success: function() {
- window.location.reload(true);
- }
- });
- }
- $('.box_status').change(function(){
- update_report();
- });
- session_start();
- if (isset ($_POST)) {
- $_SESSION['crm']['reports']['index'] = array();
- foreach ($_POST as $k => $v) {
- $_SESSION['crm']['reports']['index'][] = $k;
- }
- $_SESSION['post'] = $_POST;
- echo true;
- }
Add Comment
Please, Sign In to add comment