Server-side form validation

Results 1 to 3 of 3

Thread: Server-side form validation

  1. #1
    Ed Guest

    Default Server-side form validation

    If the user forgot to fill in a field, I would redirect the user back to the page and say "you forgot to fill in this field." This much is good. However, when I redirect the user back, all the fields he/she filled out is gone!!! Is there a way to retain the form values? <BR><BR>I have not been successfull in finding an FAQ. Any help would be appreciated! <BR>

  2. #2
    Reggie Guest

    Default RE: Server-side form validation

    On the first page you could set the values to the submitted values and just pass them back if needed.<BR><BR>firstpage.asp submits to secondpage.asp. The value will be blank unless you pass the variable back when they forget to fill it in.<BR><BR>firstpage.asp:<BR>&#060;input type="text" name="var1" value="&#060;%=request.querystring("var1")%&#062;" &#062;<BR>&#060;input type="text" name="var2" value="&#060;%=request.querystring("var2")%&#062;" &#062;<BR><BR>secondpage.asp:<BR>&#060;%<BR>if request.form("var1")="" OR request.form("var2")="" then<BR>response.redirect "firstpage.asp?var1=request.form("var1")&var2=requ est.form("var2")"<BR>end if<BR>%&#062;<BR><BR>Java is a much better solution.

  3. #3
    Ed Guest

    Default Hmm...wish things were that easy

    I have list of radio bottons with values pulling out of a database :( And I&#039;m using the POST method.

Posting Permissions

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