【问题标题】:Formmail Redirect IssueFormmail 重定向问题
【发布时间】:2012-02-13 17:07:03
【问题描述】:

我正在尝试让 Formmail 表单重新定向回它自己的页面。例如,如果我在页面上,http://www.rightfittech.com/paincenter/contact-us.html,我希望重定向返回到同一页面的http://www.rightfittech.com/paincenter/contact-us.html

我发疯似地在 Google 上搜索,但没有任何有价值的结果。论坛一直在说要创建一个隐藏的输入字段

但这不起作用!!!

下面是我的代码,注意我没有修改formmail,除了邮箱地址!

<form action="http://www.rightfittech.com/paincenter/formmail.php" name="Contact" method="post"
id="form1">
             <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER" >
             <input type="hidden" name="redirect" value="http://www.rightfittech.com/paincenter/contact-us.html"/>
             <input type="hidden" name="recipients" value="robertmyrick@hotmail.com" >
             <input type="hidden" name="mail_options" value="FromAddr=robertmyrick@hotmail.com" > 
             <input type="hidden" name="subject" value="New Contact" >
          <div class="wrapper row-2">
            <div class="col-1">
              <div class="form">
                <label>First Name:</label>
                <input type="text" />
              </div>
              <div class="form">
                <label>Last Name:</label>
                <input type="text" />
              </div>
              <div class="form">
                <label>E-mail:</label><br/>
                <input type="text" />
              </div>
              <div class="form">
                <label>Phone Number:</label>
                <input type="text" />
              </div>
            </div>
            <div class="col-2">
              <div>
                <label>Enter Your Message:</label>
                <textarea cols="1" rows="1"></textarea>
              </div>

              <div class="wrapper">
              <div class="alignright" style="float:left">
              <a href="#" class="link2" onclick="document.getElementById('form1').reset()"><em><b>Clear</b></em></a>

              <div style="width:20px; float:left">&nbsp;</div>

              <a href="#" class="link2" onclick="document.getElementById('form1').submit()"><em><b>Submit</b></em></a></div>
                                                            </div>
        </form>

【问题讨论】:

  • 您忘记包含您的formmail 脚本。

标签: php html scripting formmail


【解决方案1】:

尝试设置值good_url 而不是redirect

像这样:

<input type="hidden" name="good_url"
       value="http://www.rightfittech.com/paincenter/contact-us.html"/>

【讨论】:

    猜你喜欢
    • 2011-02-04
    • 1970-01-01
    • 2021-03-30
    • 2021-03-28
    • 2011-11-18
    • 2016-05-21
    • 2017-03-20
    • 2011-03-08
    相关资源
    最近更新 更多