【问题标题】:Need save button to save and then redirect需要保存按钮来保存然后重定向
【发布时间】:2014-08-24 06:41:22
【问题描述】:

我需要为按钮添加一个重定向,因此当用户单击更新配置文件页面的保存按钮时,它会将他们重定向到更新的配置文件

     <input type="hidden" name="submitted" id="submitted" value="true"/>
     <button class="btn form-submit" id="edit-submit" name="op" value="Publish Ad" type="submit"><?php _e('Save', 'agrg') ?></button>

请帮忙

【问题讨论】:

  • form 元素上设置正确的action 属性。

标签: redirect button


【解决方案1】:

您应该在服务器端执行此操作。

你可以像这样使用 PHP 来做到这一点:

&lt;?php header('Location: http://www.your-website.com/your/path'); ?&gt;

用户将被重定向到/your/path

Documentation available here.

【讨论】:

    猜你喜欢
    • 2018-06-03
    • 1970-01-01
    • 2010-11-20
    • 2018-09-13
    • 1970-01-01
    • 2021-09-07
    • 2022-10-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多