The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
Insert multiple from input checkbox - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28)
+--- Forum: Documentation (https://userspice.com/forums/forumdisplay.php?fid=30)
+--- Thread: Insert multiple from input checkbox (/showthread.php?tid=402)

Pages: 1 2 3 4


Insert multiple from input checkbox - picassoo - 12-24-2016

video here I have problem


Insert multiple from input checkbox - mudmin - 12-25-2016

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:
}



Insert multiple from input checkbox - mudmin - 12-25-2016

I posted a video to explain a little bit more. It will be live shortly.
https://youtu.be/Ls2NTY2mMHw


Insert multiple from input checkbox - picassoo - 12-26-2016

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 Tongue


Insert multiple from input checkbox - dan - 12-26-2016

Awesome. Glad it helped. I also sent you an email from my mudmin account about css.


Insert multiple from input checkbox - picassoo - 12-26-2016

What email picassoo_2.....@yahoo ??


Insert multiple from input checkbox - dan - 12-26-2016

Yes. I guess check your spam?


Insert multiple from input checkbox - picassoo - 12-27-2016

Send again pleasee, I cant see the email from you Sad((


Insert multiple from input checkbox - dan - 12-27-2016

Ok!


Insert multiple from input checkbox - picassoo - 02-10-2017

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 ?