Mam oto taki kod:
/* Funkcje */ function rekord($name) { return $this->row->$name; else return ''; } function Dalej() { } function Wiersz() { return $this->Wiersz; } function Otworz() { $this->lastError =''; if ($this->queryresult) { } /* Część główna */ $zap->sql = 'select * from produkty'; $zap->Otworz(); $klienci = new Query(); $klienci->sql = "select * from klienci"; $klienci->Otworz(); // wyświetlenie produktów while ($zap->Wiersz) { // wyświetlenie klientów while($klienci->Wiersz) { $option .= '<option value=\''.$users->rekord('id').'\' onclick="ob.saveKlient(this, \''.$zap->rekorde('prod_id').'\');" >'.$klienci->rekord('nazwa').'</option>'; $users->Dalej(); // wyświetlenie listy rozwijanej produktów z id klienta i z id produktu, które będą zapisane do bazy $list = '<p><select id="klient_id">'.$option.'</select></p>'; } }