O'Reilly logo

PHP 5 Social Networking by Michael Peacock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Registration

We currently have two primary database tables for our users. A users table, containing the core user data, and a users_profile table, containing other (non-essential) information.

Standard details

Our core registration fields are defined in our registration controller; they are stored as array pairs, referencing the field name with a more descriptive name (the more descriptive name is used for error messages).

/** * Standard registration fields */ private $fields = array( 'user' => 'username', 'password' => 'password', 'password_confirm' => 'password confirmation', 'email' => 'email address'); /** * Any errors in the registration */ private $registrationErrors = array(); /** * Array of error label classes - allows us to make a field ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required