<!--- Code to process login/registration goes here --->
<cfparam name="form.username" default="">
<cfparam name="form.password" default="">
<!--- Do a cfif to check for a valid login here --->
<cfif your login criteria passes>
Your logged in/registration processing code.
<cfelse>
<form action="" method="post">
<input type="text" name="username" value="#form.username#">
<input type="password" name="password" value="#form.password#">
</form>
</cfif>
Basically that. Have your form populate with information submitted from the same form. By setting cfparams above the form, you cover for when there is no submission. In a case like this, you want to have all of your processing on the same page as the form, for ease of access. If you really must spread it across pages, wytcom has the right idea. Keep the information pushing by hidden forms. Do good initial input validation and it will work out fine.
Main Topics
Browse All Topics





by: wytcomPosted on 2006-05-02 at 12:31:32ID: 16589763
One way is to use hidden form fields.
Change your page that notifies them of the error to a form with a submit button that takes them back to the login page.
When you get the submission of the login page you have the form variables submitted. So use them to set the values of the hidden form fields in the error page. Then when the error page is submitted, you get these values back again to use in your login page.