send checkbox value in PHP form

前端 未结 5 1517
别那么骄傲
别那么骄傲 2020-12-03 06:05

I have a question regarding a php form. I\'ve added a checkbox to the existing form, but not sure how to add it to the php. I would like it to send \"yes\" if the visitores

5条回答
  •  独厮守ぢ
    2020-12-03 07:03

    if(isset($_POST["newsletter"]) && $_POST["newsletter"] == "newsletter"){
        //checked
    }
    

提交回复
热议问题