How to access the form's 'name' variable from PHP

后端 未结 12 2144
小鲜肉
小鲜肉 2020-11-29 09:07

I\'m trying to create a BMI calculator. This should allow people to use either metric or imperial measurements.

I realise that I could use hidden tags to solve my pr

12条回答
  •  伪装坚强ぢ
    2020-11-29 09:36

    I had a similar problem which brought me to this question. I reviewed all the preceding answers but ultimately I ending up figuring out my own solution. I hope it helps someone else with this same issue:

    It seamlessly and efficiently accomplishes the following:

    • Passes the form name attribute via a hidden input field, without using the fallible value attribute of the submit button.
    • Works with both GET and POST methods.
    • Requires no additional, independent JavaScript.

提交回复
热议问题