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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:55:00+00:00 2026-06-08T13:55:00+00:00

I am new to codeigniter and i am facing a small issue. I have

  • 0

I am new to codeigniter and i am facing a small issue. I have a controller named “test” and would like to call the “edit_details” action within that controller. This is a test application i am developing. I would like to update a user’s information and i am sending the user id via(URL segments) the URL: “http://localhost/codeigniter/index.php/test/edit/12” as an example. The edit action loads the view with a form where the user’s details could be entered. This is done using an anchor from the view(an edit link next to each record). Anchor: “test/edit/$row->id”. Everything so far works great.

The problem is when i submit the form with the action ‘test/update_details’, the url then becomes “http://localhost/codeigniter/index.php/test/edit/test/update_details'”. The edit_details action loads a model which then does the database stuff. The id is sent using a hidden field in the view.

I am not sure what is going wrong here. The URL doesnt seem to change when i make calls to a controller. It either stays the same or gets appended to the existing URL. I have tried google to search for a solution but couldnt find any.

I still havent removed my index.php as this is a test application.
My base url in the config file is : “http://localhost/codeigniter/”
Autoloaded helpers are: form and url
Autoloaded libraries are: database

Thanks 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-08T13:55:02+00:00Added an answer on June 8, 2026 at 1:55 pm

    It sounds like you need to pass the form back using the base_url().
    In other words:

    http://localhost/codeigniter/index.php/test/edit/test/update_details
    

    is wrong. I believe you are really trying to pass the edit view details to:

    http://localhost/codeigniter/index.php/test/update_details
    

    via submit, your url is getting messed up.
    Your form_open should look like this:

    echo form_open(base_url()."test/update_details");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to CodeIgniter and have come into an issue with the insertion of
i have download the new codeigniter 2.0 and put my controller,model and view files
I am new to codeigniter and I have just created a test login system.
I am developing a new project in CodeIgniter (CI), and would like to find
I'm new to codeigniter this is my case: I have a homepage with a
I'm new in codeigniter I have problem I use my OS X Lion, and
I am new to Codeigniter and PHP.. while doing some operations i have some
I'm still very new to codeigniter. The issue i'm having is that the file
I'm new to CodeIgniter. I've been loading common templates like header and footer in
i'm new to codeigniter, i have a problem Is it possible to have same

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.