我已经通过GET request ex:
http://localhost/example.php?id=9&name=exammple
现在example.php有了一个表单域
<form method="post" action="example.php">
---form fields used to post data on server---
</form>
现在,在提交表单时,它抛出一个错误,指出未定义索引。
如何在使用GET request访问的页面中提交表单?我是一个PHP初学者。
<?php
if(isset($_POST['submit']))
{
$name = $_POST['name'];
echo "User Has submitted the form and entered this name : <b> $name </b>";
}
?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
&l