There is a slider that pulls out images from the database, switching between images should be done by navigating through radio buttons using CSS 3. I debug everything, all that remains is to transfer the “checked” value for input, and transfer the entire slider HTML frame in the same way:
<?php ... echo ... '<div id="slider"> <input type="radio" id="button_1" name="radio_buttons" checked /> <input type="radio" id="button_2" name="radio_buttons" /> ... <img src="'.$foto['foto_1'].'"> ... <img src="'.$foto['foto_2'].'"> ... </div>';}} ?> If I change the type of the 1st button to "checkbox", then the "checked" attribute will be passed without problems, but then I will not be able to switch m / s pictures, but I don’t know how to transfer it to "radio" ?! In my opinion, this is some kind of phantom bug .. the network did not find any specific syntax for radio buttons
Ready to "be a fool for 5 minutes" in your eyes. Thank!
* marked with dots pieces of code that go before and after .. and have no effect on the transfer of "checked" - tested empirically
checkedin a string variable, then it was typed in html. There are two options, in fact: 1) You have a wrongly formed string (it’s also in a loop, yes?) - enter the intermediate variable$string='bla-bla';var_dump($string);echo $string;and make sure everything is ok. 2) javascript hurts you. Look in your functions / dependencies that can capture this attribute. - rjhdby