“formulário pós -php” Respostas de código

Formulário de post php para si mesmo

// Here is how to post form data to self or to the same page & 
// avoid the PHP_SELF exploits at the same time.
<form name="my_form" method="post"
  action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>"> 
</form>
Geeky Bravo

formulário pós -php

<?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; ?>
Tamer Jarrar

Respostas semelhantes a “formulário pós -php”

Perguntas semelhantes a “formulário pós -php”

Mais respostas relacionadas para “formulário pós -php” em PHP

Procure respostas de código populares por idioma

Procurar outros idiomas de código