New to webspeed need help with basic login code

PeterProgress

New Member
Hi have completed the webspeed course, on my own, by going thru the manual.
I am about to start developing a basic application to allow a user login and access customer info.
Does anyone have some sample code, for a user login screen using a password.
The difficulty I have is in trying to understand the best way to handle 2 input fields from an initial User Screen being passed to a 2nd web object which would validate against the DB and reply with success or failure message.
Any help or direction to other relevant site or on-line tutorial would help.

many Thanks

Peter
 
There are 2 popular techniques here.

1. your login WebObject (login.p for example) validates the login request (ie looks up user/password in the database), if successfull, then it calls the entry point to your application (say main.p) using

RUN run-web-object (INPUT "main.p").

If login was unsuccessful, then login.p just regenerates the login page plus an appropriate message.

2. again login.p validates user/password, but this time generates a page with a HTTP redirect header set which then forces the browser to request main.p

Does this help?

Feel free to email me directly if you want to discuss further, I may even manage to dig out an example.

Matt.
 
Back
Top