Monday, 26 October 2009
Blank Data Being Input
The form I have created to submit the users dreams is really starting to annoy me now! I can submit the name and dream into the database fine. I've even added a timestamp field in the table to record the date and time the data was submitted (which is very useful). The problem I've been having is to validate the form. When the submit button is clicked on and there is no data in the fields, blank data is submitted to the database. This is not what I want to happen. I want the fields to be mandatory and if they are not filled in and the submit button is pressed then a message will show the user that they need to fill in the required fields. I have the error messages coming up when the fields are not filled in, which is great. However, the problem is blank data is still being submitted to the database and I'm struggling to find away around the problem.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment