vendredi 3 avril 2015

vbscript (for each x in request.form) ignores empty fields

I want to update my database according to retrieved form fields where empty fields should set database field ="not present". I used this loop through form fields but it seems that empty fields is not listed in my loop at all and so the linked field remains unchanged. What is the alternative solution?


(in this case my fields are input with type="checkbox")



for each x in request.form
if request(x)<>"" then
rs(x)=request(x)
else
rs(x)="not present"
end if
next

Aucun commentaire:

Enregistrer un commentaire