📜  从表单 html 中检索信息 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:38.474000             🧑  作者: Mango

代码示例1
// Check if the form is submitted if ( isset( $_POST['submit'] ) ) { // retrieve the form data by using the element's name attributes value as key $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; // display the results
echo '

Form POST Method

'; echo 'Your name is ' . $lastname . ' ' . $firstname; exit; }