Problem with form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Problem with form

Post by aceconcepts »

I use empty() too, but you need to be careful with it. Think about what will happen if the user needs to insert "0" (zero) as a string into a field. empty() will reject it because it's a bit stupid.
Yeah I agree, for my own practice I usually carry out further validation on my data other than just empty() :D
Post Reply