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 8802781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:10:17+00:00 2026-06-14T01:10:17+00:00

Hi I am new to Codeigniter but have hit a brick wall. I am

  • 0

Hi I am new to Codeigniter but have hit a brick wall.

I am trying to see if a user already exists.

First I upload the data via a form to a controller which does its validation etc but breaks on only that issue. I managed to find where it breaks but cant fix it from there.

Prior to all this it querys the database finds there is in fact a match username and then reaches the snippet below

      $errors = $this->tank_auth->get_error_message(); 
      //find the correct error msg

      foreach ($errors as $k => $v) $data['errors'][$k] =$this->lang->line($v);        
      //loop and find etc

      $temp_mess = $data['errors'][$k]; 
      //stores relevant stuff in the string
    }
  }
//echo $temp_mess; it outputs to the html so i can see it "says user exists"
$data['temp_mess'] = $tempmess; /// put this into a array

$this->load->view('layout', $data); ///send 
    }
}

Now for the view, it then calls the layout view etc but alas there is no output

$username1 = array(
        'name'  => 'username1',
        'id'    => 'username1',
        'value' => set_value('username1'),
        'maxlength' => $this->config->item('username_max_length', 'tank_auth'),
        'size'  => 30,
    );

<?php echo form_open('register', $form_reg_id ); ?>

<fieldset>
<legend align="center">Sign up</legend>
    <?php echo form_label('Username', $username1['id']); ?>
    <?php echo form_input($username1); ?>
    <?php $tempmess; ?>
    <div class="error"><?php echo form_error($username1['name']); ?>
    <?php echo isset($errors[$username1['name']])?$errors[$username1['name']]:''; ?>
<?php echo form_close(); ?>
</fieldset>

Thanks for any help on this

also could some one explain this line please. (for a really dumb person)

<?php echo isset($errors[$username1['name']])?$errors[$username1['name']]:''; ?>
  • 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-14T01:10:18+00:00Added an answer on June 14, 2026 at 1:10 am

    Tank_auth automatically returns an error when the username exists. Juste have to check the errors array.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’m fairly new to Codeigniter. I have been reading the user guide extensively but
I am very new to CodeIgniter, but I think I have a grasp on
I'm fairly new to user authentication, but have built some standard user authentication processes
I'm new to CodeIgniter and have come into an issue with the insertion of
I'm new in CodeIgniter and read user guide from website. Using pagination class, pagination
I am new in codeigniter, even in PHP. I want to upload a zipped
I'm new to codeigniter this is my case: I have a homepage with a
I'm really new to CodeIgniter and am having some trouble getting started. I see
I'm new in codeigniter I have problem I use my OS X Lion, and
So I thought I'd write my first codeigniter helper (still new to codeigniter somewhat).

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.