How to collect data using php from an HTML form?

后端 未结 4 1505
死守一世寂寞
死守一世寂寞 2021-01-19 12:05

Suppose there is a HTML file that has a form in it , which contains some data , which have been taken input from the user using textarea and checkbox . How do I send this da

4条回答
  •  难免孤独
    2021-01-19 12:52

    All form variables will be in $_GET or $_POST array in php (depending on which method you use to submit the form.

    The textarea or checkbox need to be named like this:

    
    
    
    Comments:
    Tick to select
    // collect.php $comments=""; if(isset($_POST["comments"])) { $comments = $_POST["comments"]; } $checker=""; if(isset($_POST["checker"])) { $comments = $_POST["checker"]; }

提交回复
热议问题