将表单发送到带有消息的电子邮件后重定向 [英] redirect after send form to email with message

查看:105
本文介绍了将表单发送到带有消息的电子邮件后重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在提交

表单查询后将用户重定向回主页,并在主页上显示消息。我在发送邮件(apply.php)文件中尝试了这个

-


$ _SESSION [''sent_message''] =="谢谢你你的申请!有人会很快与您联系。;

标题(" location:index.php");


但得到了这个错误 -


注意:未定义的索引:/ home / bigmoxy / public_html /

projects / senior / apply.php第12行的

警告:无法修改标题信息 - 已经由

发送的标题(输出从/home/bigmoxy/public_html/projects/senior/apply.php开始:

12)在第13行的/home/bigmoxy/public_html/projects/senior/apply.php中


请注意,重定向无需设置消息即可。


有人可以告诉我如何做到这一点吗?


谢谢!


Tim

解决方案

_SESSION [''sent_message''] =="感谢您的要求!有人会很快与您联系。;

标题(" location:index.php");


但得到了这个错误 -


注意:未定义的索引:/ home / bigmoxy / public_html /

projects / senior / apply.php第12行的

警告:无法修改标题信息 - 已经由

发送的标题(输出从/home/bigmoxy/public_html/projects/senior/apply.php开始:

12)在第13行的/home/bigmoxy/public_html/projects/senior/apply.php中


请注意,重定向无需设置消息即可。


有人可以告诉我如何做到这一点吗?


谢谢!


Tim


On Sun,2007年9月30日18:05:09 +0200,Big Moxy< bi ***** @ gmail.comwrote:


我想在提交

表单查询和di后将用户重定向回主页在主页上显示消息。我在发送邮件(apply.php)文件中尝试了这个

-


_SESSION [''sent_message''] = =谢谢你的要求!有人会很快与您联系。;

标题(" location:index.php");


但是得到了这个错误 -


注意:未定义索引:/ home / bigmoxy / public_html /

projects / senior / apply.php第12行$ $ $



将''==''改为''=''......这是一项任务。一旦错误输出

消失,你就可以进行标题重定向。 (顺便说一句:显示错误是

可以进行开发,但在现场服务器上禁用它)。

-

Rik Wasmus


I want to redirect the user back to the home page after submitting
their form inquiry and display a message on the home page. I tried
this in my send mail (apply.php) file -

$_SESSION[''sent_message''] == "Thank you for your request! Someone will
be contacting you soon.";
header("location:index.php");

but got this error -

Notice: Undefined index: sent_message in /home/bigmoxy/public_html/
projects/senior/apply.php on line 12

Warning: Cannot modify header information - headers already sent by
(output started at /home/bigmoxy/public_html/projects/senior/apply.php:
12) in /home/bigmoxy/public_html/projects/senior/apply.php on line 13

Note that the redirection works without setting the message.

Can someone please advise me on how to accomplish this?

Thank you!

Tim

解决方案

_SESSION[''sent_message''] == "Thank you for your request! Someone will
be contacting you soon.";
header("location:index.php");

but got this error -

Notice: Undefined index: sent_message in /home/bigmoxy/public_html/
projects/senior/apply.php on line 12

Warning: Cannot modify header information - headers already sent by
(output started at /home/bigmoxy/public_html/projects/senior/apply.php:
12) in /home/bigmoxy/public_html/projects/senior/apply.php on line 13

Note that the redirection works without setting the message.

Can someone please advise me on how to accomplish this?

Thank you!

Tim


On Sun, 30 Sep 2007 18:05:09 +0200, Big Moxy <bi*****@gmail.comwrote:

I want to redirect the user back to the home page after submitting
their form inquiry and display a message on the home page. I tried
this in my send mail (apply.php) file -


_SESSION[''sent_message''] == "Thank you for your request! Someone will
be contacting you soon.";
header("location:index.php");

but got this error -

Notice: Undefined index: sent_message in /home/bigmoxy/public_html/
projects/senior/apply.php on line 12

Change ''=='' to ''=''... it''s an assignment. And as soon as the erroroutput
there disappears, you can do a header redirect. (BTW: displaying errors is
OK for development offcourse, disable it on a live server though).
--
Rik Wasmus


这篇关于将表单发送到带有消息的电子邮件后重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆