I jak zwykle proszę o pomoc. Znalazłem w sieci dynamiczną liste rozwijalną z AJAX którą przerobiłem do własnych potrzeb. Ale nie wiem jak pobrać dane z tablicy, które chciałbym wysłać do bazy danych. Próbowałem $nazwatablicy[] i itp i dodaje mi non stop null.
class SelectBox{ public $defaultText = ''; public $title = ''; public function __construct($title, $default){ $this->defaultText = $default; $this->title = $title; } public function addItem($name, $connection = NULL){ $this->items[$name] = $connection; return $this; } public function toJSON(){ return json_encode($this); } } $productSelect = new SelectBox('','Wybierz kategorię'); $productSelect->addItem('Autobusy','autobusySelect') ->addItem('Motory,skutery,quady','motorySelect') ->addItem('Osobowe','osoboweSelect'); $autobusySelect = new SelectBox('', 'Wybierz rodzaj'); $autobusySelect->addItem('autokar') ->addItem('barobus'); $motorySelect= new SelectBox('', 'Wybierz rodzaj'); $motorySelect->addItem('adventure') ->addItem('chopper'); $osoboweSelect= new SelectBox('', 'Wybierz marke'); $osoboweSelect->addItem('Acura','acuraSelect') ->addItem('Aixam','aixamSelect') ->addItem('Alfa Romeo','AlfaSelect'); $acuraSelect= new SelectBox('', 'Wybierz model'); $acuraSelect->addItem('MDX') ->addItem('NSX') ->addItem('RDX'); $aixamSelect= new SelectBox('', 'Wybierz model'); $aixamSelect->addItem('400') ->addItem('500') ->addItem('A721'); $AlfaSelect= new SelectBox('', 'Wybierz model'); $AlfaSelect->addItem('33') ->addItem('75') ->addItem('90'); 'productSelect' =>$productSelect, 'autobusySelect' =>$autobusySelect, 'motorySelect' =>$motorySelect, 'osoboweSelect' =>$osoboweSelect, 'acuraSelect' =>$acuraSelect, 'aixamSelect' =>$aixamSelect, 'AlfaSelect' =>$AlfaSelect, ); } else{ }