12-24-2016, 09:16 PM
×
This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!
|
Insert multiple from input checkbox
|
|
12-25-2016, 07:35 PM
Ok...How about this...
Code: <input type='checkbox' name='utilizator[<?=permOp->id?>]' autocomplete='off' value='<?=$permOp->fname?>'>So, then, when the form is submitted, you have both the person selected's id and fname. So then you can process your form like... Code: if(!empty($_POST)){Code: foreach($_POST['utilizator'] as $key=>$value){Code: //run your DB insert for each untilizator here!Code: }Code: }So when you are formulating your query in the example above $key is the id of the person whose box was checked. It is already in a foreach loop so if you do a query, it will do it for every single checked person. You can experiment by doing Code: foreach($_POST['utilizator'] as $key=>$value){Code: dump($key);Code: dump($value);Code: }Code: }
12-25-2016, 08:35 PM
I posted a video to explain a little bit more. It will be live shortly.
https://youtu.be/Ls2NTY2mMHw
12-26-2016, 06:54 PM
Thank you very much, It helps me a lot, especially how easily explain. now I understand how it works.
It worked, thank you very much, I am happy that it functioned
12-26-2016, 07:16 PM
Awesome. Glad it helped. I also sent you an email from my mudmin account about css.
12-26-2016, 08:07 PM
What email picassoo_2.....@yahoo ??
12-26-2016, 09:55 PM
Yes. I guess check your spam?
12-27-2016, 05:52 AM
Send again pleasee, I cant see the email from you
((
12-27-2016, 06:07 AM
Ok!
02-10-2017, 09:53 PM
For DAN
I have the update format, pleasee send me again your email pleasee. Sorry it took so long, but I changed my work from Operator printer tu web design and manager platform web. now I’m back, to help ? |
Users browsing this thread: 2 Guest(s)


((