Question : php server self
Answered by : ramsey-ediku
<form action="<?php echo $_SERVER['PHP_SELF']; ?>">
//there is no reason to use this to submit form data to the same page
<form action="">
//will do the same thing
Source : https://stackoverflow.com/questions/14093316/why-use-serverphp-self-instead-of | Last Update : Tue, 18 Feb 20
Question : php self submit
Answered by : tamer-essam
<?php if (!empty($_POST)): ?> Welcome, <?php echo htmlspecialchars($_POST["name"]); ?>!<br> Your email is <?php echo htmlspecialchars($_POST["email"]); ?>.<br>
<?php else: ?> <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post"> Name: <input type="text" name="name"><br> Email: <input type="text" name="email"><br> <input type="submit"> </form>
<?php endif; ?>
Source : https://stackoverflow.com/questions/5826784/how-do-i-make-a-php-form-that-submits-to-self | Last Update : Mon, 15 Feb 21
Question : self submit form php
Answered by : tamer-essam
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>"
Source : | Last Update : Mon, 26 Jul 21