Welcome Guest, Not a member yet? Register   Sign In
Need help getting the current page id from the url
#1

[eluser]Unknown[/eluser]
So what iam trying to do is make it to were i click on my category i want to go into. on that page there are titles from that category. now iam making it to were i can create new topics inside the category but what i need help with is inserting that topic into the septic category_id in the data base that i would get from the URL. i really cant find out how to do this what so ever.

if some one could post maby a sample code or any help possible would be great if you guys need any thing from me to post on here to better explain this let me know.
#2

[eluser]CroNiX[/eluser]
http://yoursite.com/your_controller/your...thing_else

Code:
class Your_controller extends CI_Controller {

  public function your_method()
  {
    $id = $this->uri->segment(3);
    $something_else = $this->uri->segment(4);
  }
}
http://ellislab.com/codeigniter/user-gui...s/uri.html
#3

[eluser]Unknown[/eluser]
Thanks for showing me that that is exactly what i wanted to know how to do




Theme © iAndrew 2016 - Forum software by © MyBB