Defaulting form fields with values entered by the

Results 1 to 3 of 3

Thread: Defaulting form fields with values entered by the

  1. #1
    Ruby Agarwal Guest

    Default Defaulting form fields with values entered by the

    I have created a user registration page which has a form with text box, combo box and radio buttons. A user can come and enter his information and save the same.<BR><BR>Now when this user comes to edit his profile, he has to enter his login and password and after validation, he is taken to the registration page. This time it should be populated with his earlier values. I know how to do this by using session variables. How can I do this otherwise. Also, how can I populate the drop down with his earlier chosen variable. I have the index of the item he had selected earlier. I don&#039t know how to link this index with the drop down. <BR><BR>The problem comes because I am getting all these values from the data base on a page and then redirecting to the registration page. The first page does not have any forms. All it does is that it gets the login and password from the login page and after validating it, gets the information and then redirects to the registration page. How do I pass this information from the validation page to the registration page, such that the form is defaulted with these values.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Defaulting form fields with values entered by

    How about using cookies...........

  3. #3
    omc Guest

    Default RE: Defaulting form fields with values entered by

    All this information is in a database, right? They log in. You get their userid or whatever the primary key is. Send that to the registration page in either a session or hidden form field. Because you know their userid you can query the database for all their registration information and populate the fields using something like...<BR><BR>&#060;%<BR>qrySelect="SELECT * FROM tblRegistration where userid=" & strID<BR>set User=Con.Execute(qrySelect)<BR><BR><BR>userPref= User("Preference")<BR><BR><BR>&#039Then if you want to populate a select box for example you could...<BR><BR>do while not User.eof<BR>%&#062;<BR>&#060;OPTION VALUE="&#060;%=userPref%&#062;"&#062;&#060;%=userP ref%&#062;&#060;/OPTION&#062;<BR>&#060;% User.movenext<BR>Loop <BR>%&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts