Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8075605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:02:54+00:00 2026-06-05T15:02:54+00:00

I am using the below line to check my add user form to check

  • 0

I am using the below line to check my add user form to check if the email address does not exist in my database I have a feeling that it is working fine but I am unable to get any error messages.

$this->form_validation->set_rules('userEmail','E-Mail', 'required|valid_email|trim|max_length[99]|xss_clean|is_unique[users.email]');

In my view I have <?php echo validation_errors(); ?>

My controller is formatted as per below:

if($this->form_validation->run() === TRUE)
        {
            $userData = array(
                'fName' => $this->input->post('userFirstName', TRUE),
                'lName' => $this->input->post('userLastName', TRUE),
                'email' => $this->input->post('userEmail', TRUE),
                'password' => sha1($this->input->post('userPassword', TRUE))
            );  

            $this->db->escape($userData);
            $this->user_model->addUser($userData);
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:02:56+00:00Added an answer on June 5, 2026 at 3:02 pm

    I changed my controller to the following:

    $this->form_validation->set_rules('userEmail','E-Mail', 'required|valid_email|trim|max_length[99]|xss_clean|is_unique[users.email]');
            $this->form_validation->set_rules('userPassword','Password', 'required|trim|max_length[99]|xss_clean');
    
            if($this->form_validation->run() === TRUE)
                {
                    $userData = array(
                        'fName' => $this->input->post('userFirstName', TRUE),
                        'lName' => $this->input->post('userLastName', TRUE),
                        'email' => $this->input->post('userEmail', TRUE),
                        'password' => sha1($this->input->post('userPassword', TRUE))
                    );  
    
                    $this->db->escape($userData);
                    $this->user_model->addUser($userData);
                }
    
                $data['contentMangement'] = $this->options_model->systemOptions();
                $data['pageTitle'] = 'Add User';
                $this->load->view('_assets/header', $data);
                $this->load->view('addUser', $data);
                $this->load->view('_assets/footer');
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using below URL to show line chart but one thing I have
I'm using below code to check some form fields and render datatable table on
I am using the below line of code to check if any of the
I am trying to get the user details form mysql database by using the
I have the command line file below. I need to check for an empty
I am using the below line to blink a block. It works but the
I get an error on line 14 of the below: using System; using System.Collections.Generic;
Am using below third party API in my project development http://undesigned.org.za/2007/10/22/amazon-s3-php-class I have done
I have a VSTO Outlook 2007 Add-in. I have to check whether Outlook is
I am using the below code to validate a user's input: function validateAddress(){ //if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.