我可以在index.php上有一个表单并使用index.php处理它

Ver*_*on1 1 php

这可能吗?我看过网上似乎找不到答案.

Sou*_*rav 6

是的,为什么不

确定你可以发布到同一页面:)

的index.php

<?php
if (isset($_POST['txt']))
 echo 'Thnx for submitting the form';
else
 echo 'Submit the form';
?>
<form name="frm" method="post" action="index.php">
<input type="text" name="txt" id="txt"/>
<input type="submit" />
</form>
Run Code Online (Sandbox Code Playgroud)