Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <form>
  2. <input type="checkbox" name="item[]" value="1" />
  3. <input type="checkbox" name="item[]" value="2" />
  4. <input type="checkbox" name="item[]" value="3" />
  5. </form>
  6. <?php
  7. $app = JFactory::getApplication();
  8. $items = $_POST['type']; // This works but is not Joomla wise...
  9.  
  10. $items = $app->input->getArray(array('type_ids')); // Tried multiple ways but can't get it to work.
  11. ?>
  12.  
  13. $items = JRequest::getVar('item', array());
  14.  
  15. $items = $app->input->get('item', array(), 'ARRAY');
  16.  
  17. // Get POSTed data
  18. $data = $this->input->post->get('jform', array(), 'array');
  19.  
  20. // Get input object
  21. $jinput = JFactory::getApplication()->input;
  22.  
  23. // Get posted data
  24. $data = $jinput->post->get('jform', array(), 'array');
  25.  
  26. $jinput = JFactory::getApplication()->input;
  27. $data2 = $jinput->post->getArray(array());
  28. var_dump($data2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement