我该怎么做呢? [英] How Do I Do This?

查看:62
本文介绍了我该怎么做呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我创建了一个RSVP脚本的开头,以便人们可以确认/拒绝我通过电子邮件发送的邀请。 br />

当他们转到RSVP脚本时,( www.site.com/rsvp.php),他们在文本字段(称为电子邮件)中输入他们的

电子邮件地址。输入的电子邮件是

,根据数据库中的电子邮件地址进行验证。如果验证

失败,则表示未在数据库中找到电子邮件地址。请

查看电子邮件地址,然后重试。


如果验证成功,用户可以选择确认或

拒绝邀请。这是通过文字链接完成的。


我想做的是:


一个链接(< a href = confirm .php>确认< / a>)插入确认字样在数据库中的选项字段中,另一个链接(< a

href = decline.php>确认< / a>)插入单词已拒绝字样。在数据库中的选项

字段中。我正在使用PHP来做到这一点。有谁做过这个

之前?这似乎很简单,但是,我不能完全理解它。


任何帮助都将不胜感激。


谢谢提前,


Justin Kozuch

创始人,梦想成真

Netkeepers.ca - 自豪地成为DreaminginTO的主办赞助商.com

w: http://www.dreamingNOSPAMinto.com

e: ju****@dreamingNOSPAMinto.com

Hi All,

I have created the beginnings of an RSVP script so that people can
confirm/decline an invitation I send via email.

When they go to the RSVP script, (www.site.com/rsvp.php), they enter their
email address in the textfield (called email). The email entered is
validated against the email address in the database. If the validation
fails, then it says "The email address was not found in the database. Please
check the email address and try again."

If validation is successful, the user is given the option to confirm or
decline the invitation. This is done via a text link.

What I would like to do is this:

One link (<a href=confirm.php>confirm</a>) insert the word "confirmed" in
the option field in the database, the other link (<a
href=decline.php>confirm</a>) inserts the word "declined" in the option
field in the database. I am using PHP to do this. Has anyone done this
before? It seems simple, however, I can''t quite get my head around it.

Any help would be greatly appreciated.

Thanks In Advance,

Justin Kozuch
Founder, Dreaming in TO
Netkeepers.ca - Proud to be a Hosting Sponsor for DreaminginTO.com
w: http://www.dreamingNOSPAMinto.com
e: ju****@dreamingNOSPAMinto.com

推荐答案

我注意到Message-ID:< 3x ******************* @ news20.bellglobal.com>
Justin Kozuch的
包含以下内容:
I noticed that Message-ID: <3x*******************@news20.bellglobal.com>
from Justin Kozuch contained the following:
一个链接(< a href = confirm.php>确认< / a>)插入单词确认"在数据库中的选项字段中,另一个链接(< a
href = decline.php> confirm< / a>)插入单词已拒绝。在数据库中的选项
字段中。我正在使用PHP来做到这一点。有没有人这样做过呢?看起来很简单,但是,我不能完全理解它。
One link (<a href=confirm.php>confirm</a>) insert the word "confirmed" in
the option field in the database, the other link (<a
href=decline.php>confirm</a>) inserts the word "declined" in the option
field in the database. I am using PHP to do this. Has anyone done this
before? It seems simple, however, I can''t quite get my head around it.




你必须传递一个变量(行id或其他一些)独特的价值)

到页面,以便他们知道要更新的记录。


-

Geoff Berrow
它只是Usenet,没有人死。

我的意见,而不是委员会的,我的。

简单的RFD http://www.ckdog.co.uk/rfdmaker/


2003年10月13日星期一08:43 pm,Justin Kozuch写道:
On Monday 13 October 2003 08:43 pm, Justin Kozuch wrote:
大家好,

我创建了RSVP脚本的开头,以便人们可以确认/拒绝我通过电子邮件发送的邀请。

当他们转到RSVP脚本时,( www.site.com/rsvp.php),他们在文本字段中输入他们的
电子邮件地址(卡莱电子邮件)。输入的电子邮件将根据数据库中的电子邮件地址进行验证。如果验证失败,则表示未在数据库中找到电子邮件地址。
请检查电子邮件地址,然后重试。

如果验证是成功后,用户可以选择确认或拒绝邀请。这是通过文本链接完成的。

我想做的是:

一个链接(< a href = confirm.php>确认< / a> )插入确认一词在数据库中的选项字段中,另一个链接(< a
href = decline.php> confirm< / a>)插入单词已拒绝。在数据库中的选项
字段中。我正在使用PHP来做到这一点。有没有人这样做过呢?看起来很简单,但是,我不能完全理解它。

任何帮助都将不胜感激。
Hi All,

I have created the beginnings of an RSVP script so that people can
confirm/decline an invitation I send via email.

When they go to the RSVP script, (www.site.com/rsvp.php), they enter their
email address in the textfield (called email). The email entered is
validated against the email address in the database. If the validation
fails, then it says "The email address was not found in the database.
Please check the email address and try again."

If validation is successful, the user is given the option to confirm or
decline the invitation. This is done via a text link.

What I would like to do is this:

One link (<a href=confirm.php>confirm</a>) insert the word "confirmed" in
the option field in the database, the other link (<a
href=decline.php>confirm</a>) inserts the word "declined" in the option
field in the database. I am using PHP to do this. Has anyone done this
before? It seems simple, however, I can''t quite get my head around it.

Any help would be greatly appreciated.




我会创建一个单独的页面rsvp.php,它们都会为

目的生成一个表单,并处理它创建的表单的输入。这有两个步骤(输入地址然后接受或拒绝),而不是这两个步骤,我将这些组合成

。使用单个输入框为

电子邮件地址构建表单,并使用三个按钮:

1.接受

2.拒绝

3.取消

所有三个按钮都提交。这可以避免需要cookie或会话处理

这对于一个简单的一步任务来说。另一个好处是你可以在你的电子邮件中放入两个链接,例如:

-----示例-----

请来我的brthday派对!你可以在这里回复:

< a href =" http://www.example1.com

rs *********** ************* @ example2.com& rsvp = accep t"> ACCEPT< / a>


< a href =" http ://www.example1.com

rs ************************ @ example2.com& rsvp = decli ne" ;> DECLINE< / a>

希望能在那里见到你!

-----示例-----


现在,巧妙的是你可以使用SQL更新处理所有内容

声明:


首先,进行安全检查。检查



I would create a single page, rsvp.php, that both produces a form for the
purpose and processes the input of the form it creates. Instead of doing
this with two steps (input address then accept or decline), I''d combine
these into a single form. Build the form with a single inputbox for the
email address, and three buttons:
1. Accept
2. Decline
3. Cancel
All three buttons submit. This avoids needing cookies or session handling
for what is really a simple one step task. Another benefit is that you can
put two links in your email, like so:
----- EXAMPLE -----
Please come to my brthday party! You can RSVP right here:
<a href="http://www.example1.com
rs************************@example2.com&rsvp=accep t">ACCEPT</a>

<a href="http://www.example1.com
rs************************@example2.com&rsvp=decli ne">DECLINE</a>
Hope to see you there!
----- EXAMPLE -----

Now, the neat thing is that you can handle everything with an SQL update
statement:

First, do your security checks. Check


_REQUEST [" rsvp"]以确保它是接受或拒绝,没有别的。然后检查
_REQUEST["rsvp"] to be sure that it
is either accept or decliine, nothing else. Then check


这篇关于我该怎么做呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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