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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:52:17+00:00 2026-06-16T15:52:17+00:00

I am new to the codeigniter and i am trying its tutorials from the

  • 0

I am new to the codeigniter and i am trying its tutorials from the user guide. But i just got stuck in one place. In the code of the form validations. I am trying its example for the set_value property but my user text box is not returning anything.

In my view i added the following code:

<?php echo validation_errors();?>
<?php echo form_open('form');?>
<table border="0">
<tr>
    <td><h5>Username</h5></td>
    <td><input type="text" name="username" value="" size="50" value="<?php echo set_value('username'); ?>" /></td>
</tr>
<tr>
    <td><h5>Password</h5></td>
    <td><input type="password" name="password" value="" size="50" accept=" <?php echo set_value('password'); ?>" /></td>
</tr>
<tr>
    <td><h5>password Confirm</h5></td>
    <td><input type="password" name="passconf" value="" size="50"  /></td>
</tr>
<tr>
    <td><h5>Email Addres</h5></td>
    <td> <input type="text" name="email" value="" size="50" accept="<?php echo set_value('email'); ?>" /></td>
</tr>
<tr>
    <td>&nbsp;</td>
    <td><div><input type="submit" value="Submit" /></div></td>
</tr>
</table>
</form>

and in my controller i added the following code:

function index()
{
    $this->load->helper(array('form', 'url'));

    $this->load->library('form_validation');

    $this->form_validation->set_rules('username','username','required|min_length[5]|max-length[10]|xss_clean');
    $this->form_validation->set_rules('password','password','required');
    $this->form_validation->set_rules('passconf','password confirmation','required');
    $this->form_validation->set_rules('email','email','required');

    if ($this->form_validation->run() == FALSE)
    {
        $this->load->view('myform');
    }
    else
    {
        $this->load->view('formsucces');
    }
}

Thank You in advance.

  • 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-16T15:52:19+00:00Added an answer on June 16, 2026 at 3:52 pm

    There are two value attributes in your input type..

    Try this…

    <td><input type="text" name="username" size="50" value="<?php echo set_value('username'); ?>" /></td>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new in CodeIgniter and read user guide from website. Using pagination class, pagination
I am new to codeigniter and trying to capture multiple values from a single
This snippet of code is taken from codeigniter and i'm trying to copy it
I'm thinking about using CodeIgniter for a new project. I was reading the user-guide
I'm trying the slider widget in jQuery Mobile, and just copied the code from
I'm new to MVC and Codeigniter and am trying to get a class working.
I've written a new model for my CodeIgniter framework. I'm trying to load the
I am trying to get the new PDO driver running in Code Igniter 2.1.1
I'm new to Codeigniter and I'm trying to develop a simple website with a
I am trying to use SimpleTest with CodeIgniter, using code supplied by maroonbytes .

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.