阻止用户,如果用户在x分钟内点击按钮的时间
问题描述:
在我的网站上,用户有多次点击提交按钮,我收到了2000个同一用户的电子邮件。
你可以指导我如何解决这个问题问题,表示用户点击x分钟的时间。
in my website, a user have click submit button numerous time, and i got 2000 email for same user.
can you guide me to how to solve this issue, means if user click on number of time in x minute.
答
在你的数据库中创建一个表
列:
Userid e_mail_time
1 10:00:00
1 10:30:00
2 10:45:00
In your db create a table
columns:
Userid e_mail_time
1 10:00:00
1 10:30:00
2 10:45:00
Quote:
将Userid设为fk-到您的用户表
Make Userid as fk-to your user table
1.始终在表格中插入新行
用户发送电子邮件。
2 。在发送电子邮件之前查询上表并检查用户在一段时间间隔内发送的电子邮件的数量
1.Insert a new row to the table all the time
user send a email.
2.Before sending email query the above table and check x no of
email send by the user in between a time interval