Re: Limit FORM mailer submissions to 5 on website, then pause until reviewed by webmaster




Lance wrote:

Thank you Matt.

Your response and suggestions were amazing and well detailed. It's
given me a lot more to think about and definitely helped me to see the
bigger picture and protection problems.


Happy to help, but please quote context when you reply.

Although i may not get a large number of posts simultaneously, i will
need to think about either counting the current sessions or applying a
lock on a file, as the type of posts could mean that users spend 30
minutes writing the post before clicking submit. It sounds easier to
have a script that creates a temporary row in a sessions table as soon
as the Form Windows is opened. I would need to include a script just
before that to do a count on the session table. If the count is >= 5,
then don't display the input form and instead display the message,
otherwise show the form.


You wouldn't lock the file from the time they come to the page until
the time they submit. That would make your application impossible to
use. All I meant is that the file is locked while the transaction to
the database occurs (fraction of a second), so that no other attempts
to submit can happen while that one is in progress. The same can be
done by writing a proper transaction when you submit to your database
so that the table(s) are locked while that update occurs.

I think you have too much faith in the statefulness of web
applications, though. It's a bad idea to try and stop submissions when
you think you might have reached your limit. What if the person loads
the page and then goes away? What if they fill out some of the form and
go away? You'd then need a way to (somewhat arbitrarily) reap the
unused locks you've written to your database, which is an ugly
approach.

There's no nice way to do what you're after, other than to check your
count however you implement it both before displaying and before
accepting (don't forget a spammer who gets the source for your form can
bypass the first count). And that means that some people may get
rejected. It's just a fact of life if you're going to impose a limit
like you want.

So to avoid being flamed, could I ask if anyone could recommend a good
place to start and the best programming language to go with? I'll be
very grateful for any links and additional pointers.


Yes, Perl, but that's what you get for asking in a Perl newsgroup. I
doubt that you'll find anything prewritten, because these kinds of
multi-faceted applications tend to be use-specific, so there's no good
way to abstract them into something that anyone could plug in. If
you're looking to write it yourself, you might want to start at
learn.perl.org, otherwise you could look for someone to freelance at
jobs.perl.org.

Matt

.



Relevant Pages

  • RE: Userform to add and update a table
    ... One of the most common scenarios in application development is to display ... the walkthrough illustrates many of the basic ... Access to a server with the Pubs SQL Server sample database. ... Creating the Windows Form. ...
    (microsoft.public.sqlserver.programming)
  • Re: Picture property for Access 2K forms
    ... and it works great...until you look at the database size involved. ... or by simply scaling down the image display in the ... > supported by those filters. ... To associate a graphic file with an OLE Server, ...
    (microsoft.public.access.devtoolkits)
  • Re: Combining tables from two copies of DB
    ... I agree that the challenge with the other database is the junction table. ... linked to the Sessions table through a foreign key field. ... the employee names. ... >> in many training sessions, and each training session may be attended by ...
    (microsoft.public.access.queries)
  • Re: Unknown Maiden Name [WAS how-to ruin a perfectly good FGS]
    ... through at the beginning of my database, ... or display your information in the fields you intended for them. ... the names in a manner you didn't intend and the meaning has become ... If my data is on the Internet and people don't understand it, ...
    (soc.genealogy.methods)
  • Re: webviewer background image from filemaker container field
    ... It is not elegant or simple the moment you factor in how a webviewer ... passes the result back to FM to display. ... info out of the schema of the database. ... And the quality of advice in books and formal filemaker education is ...
    (comp.databases.filemaker)