Christina wrote:
Basically I want to make a page (page1) which helps users to create their accounts. 
Usernams and password are stored in a database;
So everytime,  uername is checked to see if it has been taken, or inanother word if 
there is any entry with the same value in that table.
If this username is already taken, then re-show page1 with all data that user has 
inputed but add an error message for duplicated username
if this username is not taken, then go to next step.
I use CForm to define those widgets and flowscipt to navigate thourgh those pages,
but now i found the problem is "how can flowscipt know the result of database query? "
here is main steps:

1. flowscipt initialize page1 and show it
2. user input data and pass basic validation (string length, etc), go back to flowscipt
3. flowscript use another pipeline (esql or sql transformer) to see if there is any 
entry in the database with the same username

Here's where I would differ on the choice of design for your system. The Flowscript could instantiate a component that would let you query your backend system -- you don't even have to bother using a pipeline for this. All you'd need to do is something like:


var user = Backend.findUser("username");

the findUser() function would obviously return the user it found in the database, and potentially null if the user doesn't exist. You could also just have it return a boolean value to test if the username exists or not.

4. HOW CAN FLOWSCIPT GET THE RESULT OF THE QUERY????

Thank you for your help!

Regards, Tony


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to