0

I have two fields with the same name, I want to click on one of the radio buttons, don't send another field.

this if don't work (isn't live=needs to click on submit)

                  `if ($_POST['radio'] == "first")`

Is there a small function?

<input type="radio" name="radio" value="first">
<input type="radio" name="radio" value="second">

<input type="text" name="target" value="this item when radio=first is checked">
<input type="text" name="target" value="this item when radio=second is checked">
Jonas
  • 121,568
  • 97
  • 310
  • 388
  • Does this answer your question? [What is the difference between client-side and server-side programming?](https://stackoverflow.com/questions/13840429/what-is-the-difference-between-client-side-and-server-side-programming) – CBroe Sep 14 '21 at 06:33
  • Not sure what exactly you want to achieve here, but you should probably go and have a thorough read of the mentioned duplicate first of all, because it sounds like you have not understood some elemental basics yet. If you want anything to happen on the client, without a round-trip to the server - then you'll probably have to do it in JavaScript. – CBroe Sep 14 '21 at 06:35
  • Can't really tell what the difference between this, and your previous question https://stackoverflow.com/q/69095838/1427878, is supposed to be either. – CBroe Sep 14 '21 at 06:36

0 Answers0