Jump to content
Larry Ullman's Book Forums

Daniel Shanahan

Members
  • Posts

    2
  • Joined

  • Last visited

Daniel Shanahan's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I'm trying to get my head around the various validation functions in PHP. As a beginner, I'm trying to simplify things as much as possible. So, based on the information on page 49 in the book I have this general rule: When validating a text or textarea use !empty(); when using a radio button or select use isset(). My questions: 1. Is this a good general rule? 2. Can !empty() be used instead of isset()? This would certainly make things more simple. 3. Since isset() can return TRUE on an empty string (p. 49), why is it used in the calculator example for the distance (p. 88)? The top matrix on the PHP site is certainly helpful. Still, the plethora of validation options does make this a bit confusing, at least for me. So, any simplification is helpful. Thanks.
×
×
  • Create New...