php实现表单提交处理
发表于:2024-03-02 20:35:09浏览:74次
php实现表单提交处理:
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$name = $_POST['name'];
echo "You submitted: " . $name;
}
?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="text" name="name">
<input type="submit" value="Submit">
</form>
栏目分类全部>