Submission form won't stay on same page

后端 未结 1 1006
无人共我
无人共我 2021-01-23 22:19

Here is my form:

    
相关标签:
1条回答
  • 2021-01-23 23:00

    Specifying no action will submit the form to the current page:

    <form action="" method="post">
    

    Alternatively use $_SERVER['PHP_SELF']:

    <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" method="post">
    
    0 讨论(0)
提交回复
热议问题