Read an interesting article today about yet another thing to worry about. Suppose you verify a UserID and Password with something like this:
select count(UserID) from LoginTest where UserID='$user1' and Pass='$pwd1'
Now suppose some clown gives you a UserID like this:
' or 1=1--
The generated SQL would be
Select count(UserID) from LoginTest where UserID='' or 1=1--and Pass=''
Since the -- is the start of a comment in SQL, someone could easily break into your database and cause problems. Always protect yourself from special characters in user input.