我有一个名为“delete-wish-form.php”的 PHP 文件,其表单包含以下字段:
- wishId(隐藏字段) 该字段的值应等于通过 URL 传入的 GET 变量。所以我的问题是如果 URL 是 delete-wish-form.php?wishId=1 那么我希望我的隐藏字段看起来像这样:
代码:
<!DOCTYPE HTML>
<html>
<title>Delete Wishes</title>
<body>
<h2>Wishes Form</h2>
<?php
$wishId = $_GET['wishId'];
?>
<form method="get" action="process-delete-wish-form">
<input type="hidden" name="wishId">
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>