Hello all!

I am trying to construct a login page. I have users registering on the site using ZPT, python script, and ZSQL methods, and their account information is held in a table ("clients") in a psql database. Now, I want to be able to garner their clientid (primary key) during login, and pass it as an argument to another page.

I have the following as the login:

Page ID: 'login'

<form action="login.py" method="post">

<input type="text" name="email:string:required"  size="50"></p>

<input type="password" name="password:string:required"  size="50"></p>

<p><input class="submit" type="submit" name="submit" value="login" /></p>


The following is the python script: 'login.py'

(parameters=email, password)

# get sql method

# call it, passing arguments

# return a confirmation page
return page()

Finally, the following is the sql method: 'sql_login'
(arguments=email, password)

select clientid from clients where email=<dtml-sqlvar email type=string> and password=<dtml-sqlvar password type=string>

I am sure this should be simpler than I am trying to make it, but I'm stuck.

Any help would be greatly appreciated.  Thanks!


Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

ZPT mailing list

Reply via email to