Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form>
- <input type="checkbox" name="item[]" value="1" />
- <input type="checkbox" name="item[]" value="2" />
- <input type="checkbox" name="item[]" value="3" />
- </form>
- <?php
- $app = JFactory::getApplication();
- $items = $_POST['type']; // This works but is not Joomla wise...
- $items = $app->input->getArray(array('type_ids')); // Tried multiple ways but can't get it to work.
- ?>
- $items = JRequest::getVar('item', array());
- $items = $app->input->get('item', array(), 'ARRAY');
- // Get POSTed data
- $data = $this->input->post->get('jform', array(), 'array');
- // Get input object
- $jinput = JFactory::getApplication()->input;
- // Get posted data
- $data = $jinput->post->get('jform', array(), 'array');
- $jinput = JFactory::getApplication()->input;
- $data2 = $jinput->post->getArray(array());
- var_dump($data2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement