PHP Scripts Development » PHP Classes Support Forum » Access_user Class Support forum

AU Class required field real_name

(4 posts)

Great offers not only for geeks!


  1. User has not uploaded an avatar

    cjacks
    Member

    Hi could someone tell me how to make the real_name field in the register.php form required? Thanks!

    Posted 7 months ago #
  2. try this:

    if (isset($_POST['Submit'])) {
    	if (empty($_POST['name'])) {
    		$new_member->the_msg = "Please enter your real name.";
    	} else {
    		$new_member->register_user($_POST['login'], $_POST['password'],
    $_POST['confirm'], $_POST['name'], $_POST['info'], $_POST['email']);
    	}
    }
    Posted 7 months ago #
  3. User has not uploaded an avatar

    cjacks
    Member

    Perfect. Still curious as what in access_users_class.php does the actual field validations for login..etc?

    Posted 7 months ago #
  4. Yes right the validation for the "important" files are located in the class file.

    Inside the register_user() method are several other methods called for the diff. validations. f.e. the login name and email address are checked if they in the database already exitst

    Posted 7 months ago #

RSS feed for this topic

Reply

You must log in to post.