check-box conditioning |
Hi coders,
i have list of check-box and there are same value and there are not. now i want to create condition, example if i check 3 check-box with different value it retrurn false, while if i check 3 checkbox with the same value it wil return true. how do i in php? any help well appreciate . . . . thanks (02-04-2015, 11:52 PM)jaysondotp Wrote: Hi coders, First you will have to post it somewhere so for example purposes we'll say the form/checkboxes is located at http://example.com/admin/form We will say you are submitting the form to : http://example.com/admin/save In the admin controllers --> save method you will have to get the data from the $_POST once you have that is when you can check if you have three values of the same like so: PHP Code: $i = 0; Or you could use jQuery to not even let it get to that point. Code: <script type="text/javascript">
Thanks "egall8"..
and here is the scenario. take a look an image below as you reference. check-box value is PR No. which is, when i check different PR No. it will come false. else return true. how could i make it in php or in javascript.... |
Welcome Guest, Not a member yet? Register Sign In |