client_ip look up for form submission

0 views
Skip to first unread message

Bill

unread,
Jun 1, 2009, 12:31:38 AM6/1/09
to web2py Web Framework
Hi,

The code below is from Page 50 of the pdf book. Need an example for
selecting a saved ip address in a table which could verify if a user
has or has not submitted a posting within a specified time period. In
the example below, there are specified form fields. Could you give me
an example of how a selection can be made from a table and redirect
the user if the conditions aren't met.

1 def first():
2 form=FORM(INPUT(_name='visitor_name',requires=IS_NOT_EMPTY()),
3 INPUT(_type='submit'))
4 if form.accepts(request.vars,session):
5 session.visitor_name=form.vars.visitor_name
6 redirect(URL(r=request,f='second'))
7 return dict(form=form)

Thanks in advance.
Reply all
Reply to author
Forward
0 new messages