Click to See Complete Forum and Search --> : how to validate my form?
sakhy
03-13-2006, 12:25 AM
i have a form, which allows a user to create his account. Now in this form ther are ,few optional fields and few compulsory fields.The problem is how can i updtae data in the database.. with optional fields causing much problem.
i hope u undertsand my question.
bathurst_guy
03-13-2006, 12:51 AM
Why did you post this in the Accessibility forum?
the tree
03-13-2006, 04:48 AM
If there is no value then just put in a placeholder.
Just run a standard SQL INSERT (you said "create and account" so I'm assuming an account doesn't exist which would call for an INSERT rather than an UPDATE), and list all fields in your INSERT.
If the textbox is empty (indicating an optional field), then a blank or null would get INSERTed. No big deal, and you don't have to worry about what has data and what doesn't.
DaveSW
03-21-2006, 04:37 AM
The thread in javascript appears to have a better response
http://www.webdeveloper.com/forum/showthread.php?p=530131#post530131