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

后端 未结 12 2139
小鲜肉
小鲜肉 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:35

    As petervandijck.com pointed out, this code may be susceptible to XSS attacks if you have it behind some kind of log-in system or have it embedded in other code.

    To prevent an XSS attack, where you have written:

    
    

    You should write instead:

    
    

    Which could even be better written as:

    
    

提交回复
热议问题