0

I have a form built that currently sends info to a DB and allows me to email the person right after submission. Unfortunately, it only refreshes and clears the values of the page, I would like it to take them to a thank you page. The <form action="" is being used to POST it's data, is there a way I can post said data while still linking to a new page?

Code split up for readability

    <form id="hsForm_99a6d115-5e68-4355-a7d0-529207feb0b3_8417" class="hs-form
        stacked hs-custom-form" accept-charset="UTF-8"
        action="https://forms.hubspot.com/uploads/form/v2/341117/99a6d115-5e68-4355-a7d0-529207feb0b3" 
        enctype="multipart/form-data" method="POST" novalidate="novalidate">
<!-- Some form stuff...-->

<div class="form-actions form-wrapper" id="edit-actions">
<div class="hs_submit">
<div class="hs-field-desc" style="display: none;"></div>
<div class="actions"><input class="hs-button primary large" type="submit" value="Submit"></div>
</div>
</div>

</form>
4

2 回答 2

1

您可以通过在验证用户数据后将标头信息发送回客户端来执行此操作。请记住,标头信息必须在任何其他输出之前发送。

header('Location: myThankYouPage.php');

http://php.net/manual/de/function.header.php

于 2015-04-14T14:06:14.423 回答
0

在处理数据后的“动作”文件中,使用 标头函数将用户重定向到新页面

于 2015-04-14T14:06:33.957 回答