Forums
This topic is locked
Only allow 2 postings
Posted 10 Nov 2003 17:41:06
1
has voted
10 Nov 2003 17:41:06 Richard Mallinson posted:
I have set up a username and password system. Once the user has logged in they can post a message on an announcement board. This just adds a record to my access database. What im wanting to do is only allow users to post 2 message per week. Does anyone have any idea how to do this?Thanks
Simon
Replies
Replied 11 Nov 2003 00:38:11
11 Nov 2003 00:38:11 Phil Shevlin replied:
What if you do a select statement...
select * from yourtable where submitter = JohnDoe and messagedate >= (GETDATE() - 7)
then count rows.
If there are less then 2 show the submission form
else
Display a warning that the limit has been reached
select * from yourtable where submitter = JohnDoe and messagedate >= (GETDATE() - 7)
then count rows.
If there are less then 2 show the submission form
else
Display a warning that the limit has been reached
Replied 11 Nov 2003 18:50:26
11 Nov 2003 18:50:26 Richard Mallinson replied:
Im only new to all this asp business. Is there any chance you could write me a bit of code that I can use?
Thanks
Simon
Thanks
Simon