// there are x buttons, when you click button x you need to send a button x value, but // all buttons in the browser should be displayed with the same name, for example Y

<?php while($result2=mysqli_fetch_array($data2)) { $sub=$result2['name']; $clas=$result2['classid']; echo "<option value='" . $id ."'>" . $sub ."</option>"; // echo "<input name = \"DZ2\" type = \"hidden\" value = \"$clas\" />"; echo "<input id = \"DZ\" name= \"$clas\" type = \"submit\" value = \"$clas\" />"; ?> 

IT SHOULD BE HOW NOW THAT PUSH BUTTONS HAVE BEEN TRANSFERRED AT POST

    1 answer 1

    I figured it out myself, maybe someone would need $ i = name of the button that he pressed, wrote the selected button into the name, since the value of the buttons on the page should be the same and the functions under the buttons are different, the number of buttons should be random

      <?php $city = $_POST; $array[] = $city; //print_r($array); //echo $array[0][2]; for ($i = 0; $i <=1000; $i++) { if(isset($array[0][$i])) { echo $i; break; } } ?>