Hi guys,

i have this function:

def login():
    form = FORM(
    'Name', INPUT(_name='name'),
    'password', INPUT(_password='password'), 
    INPUT(_type='submit'))
    if form.process().accepted:
        name = form.vars.name
        records = SQLTABLE(dba(dba.user.name== name).select(dba.user.
password),headers='fieldname:capitalize')
        passworddb = records[1]
        password = form.vars.password
        dba.person.insert(name = 'test', email=password)
        if passworddb == password:
           redirect(URL('register'))
        else:
           redirect(URL('index'))
    
    return dict(form=form)


As you can see, you enter name and password into a form, and from a db it 
choose a password correspondending to the username. that part works fine. 
but the problem is on the part:

password = form.vars.password

i think this doesnt work, since the line below


dba.person.insert(name = 'test', email=password)

inserts into another db "test", "none"

Do anyone has an idea how to fix this problem? Or can anyone tell me what i 
did wrong?

Thanks for the help,
Darren

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to