提交表单后以模态引导方式发送的消息

时间:2019-09-23 23:10:45

标签: php html modal-dialog

我想收到模式引导程序“已成功发送!”中的消息。从我的订购单中单击“提交”后,当前它会上传到另一页thank.com/script.php

我的html:

<form action="script.php" method="post" class="col-md-8">
<fieldset><legend>Request Withdrawal</legend><br>
<div class="form-group">
    <label for="assunto">Username</label>
    <input type="text" class="form-control" id="assunto" placeholder="Username" name="assunto">
  </div>
<div class="form-group">
    <label for="nome">Name</label>
    <input type="text" class="form-control" id="nome" placeholder="Full Name" name="nome">
  </div>
<div class="form-group">
    <label for="email">E-mail Address</label>
    <input type="email" class="form-control" id="email" aria-describedby="emailHelp" placeholder="Your email" name="email">
    <small id="emailHelp" class="form-text text-muted">We will never share your email with anyone.</small>
  </div>
  <div class="form-group">
    <label for="mensagem">Value</label>
    <input type="text" class="form-control" id="mensagem" placeholder="Required Amount" name="mensagem">
  </div>
  <input type="submit" class="btn btn-warning" name="enviar" value="Request Payment">
</fieldset>
</form>

我的Script.php:

<?php

$assunto    =     $_POST['assunto'];
$corpo      = "
    Username: "   .$_POST['assunto']."
    Nome: "      .$_POST['nome']."
    Email: "     .$_POST['email']."
    Valor "   .$_POST['mensagem']."
";

mail('example@example.com',$assunto,$corpo,'from: Remetente');
echo 'Withdrawal Pending ..! <a href="dashboard"> « Come back</a>';


?>

0 个答案:

没有答案