[SOLVED] Set value on Array |
HI , i have a form with a number of field text variable :
Code: <?php for ($i = 0; $i <$numMacchineLottoSpostabili ; ++$i) : ?> How can i set properly value='<?=set_value('seriale[]')?>' ? because in this way doen't work ... I try <?=set_value('seriale[<?=$i?>]')?> but same problem
Example.
Before form: $seriale = set_value("seriale", []); In input: echo $seriale[$i] ? $seriale[$i] : "'; P.S. Wrote on phone
Simple CI 4 project for beginners codeigniter-expenses
how can i set on error correctly :
this is my validation : Code: $rules= But error showed is : Seriale seriale.* obbligatorio , can i insert in the error message the value passed by post too?
See https://codeigniter4.github.io/userguide...all-errors
Replace {field}
Simple CI 4 project for beginners codeigniter-expenses
(09-15-2023, 03:55 AM)ozornick Wrote: Example. There is something wrong , this is my code : view : Code: <?php controller : Code: if($this->request->getMethod() === 'post') If i insert on field seriale 1 "seriale 1" and on field seriale 2 "seriale 2" ( value that return falsse on seriale_corretto_cambio_clienti) . When i send the post i have in field seriale 1 the value seriale 2 the other is empty . edit until line : found this error : $i start to 1 on field list change Code: <?php -------------------------------------------------------------- The error message are two (but the same) : Il seriale.* non è un seriale corretto Il seriale.* non è un seriale corretto
Find solution:
Code: |
Welcome Guest, Not a member yet? Register Sign In |