Thursday, June 30, 2011

Input Validation

Earlier this week I created a webpage allowing users to add themselves to my database. A friend of mine was looking at it and found a problem. Instead of telling me though, he decided to show me, by adding 100 blank people to the database.

Input validation! It is necessary. It is also really f***ing difficult to do. I've been researching this for 2 hours and playing around with things, and nothing works at all. I first tried to create a script that would capitalize the first letters of the name inputs, but that failed entirely. Then I tried a more simple goal, checking to see if an input was blank or not. And that's not possible either. Or at least it's not working.

I'm about one more try away from being done, I'll post an update when I reach that.

EDIT (5:06 PM): Alright, I have gotten the name to capitalize correctly. Now to work on the prevention of submission of there are other errors.

No comments:

Post a Comment