I am developing an application using CodeIgniter. In this case I would like to get URL like www.something.com/book/bookname while I am clicking on an anchor tag of View.I would not like to get URL like www.something.com/book/bookname/12. On the other hand I have to pass book id from View to Controller.
Could anyone say how can I do that ??
Thanks
@Allendar
I failed to express.Sorry for that.Lets have a scenerio. I have a list of books in my View. Like below
Sl no Name of book Price
- php book $10
- MySql book $15
- html book $20
- css book $12
Now I would like to see details of a book. In this case I hiperlinked the book name, where the book id is inside a anchor tag. If I clicked on a book name I'll get a URL like www.something.com/book/get_book/12. Where book is the name of Controller, get_book is a function inside the Controller and 12 is the book id. Then I can get details of a book using the id 12 from database.This is the common secenerio in almost all applications.
But I need a special URL, that is www.something.com/book/get_book/php book. But I would like to get the id of the book in Controller to find out the book in database(because id of the book is UNIQUE,but name of the book is not UNIQUE).Even I would not like to get a URL like www.something.com/book/get_book/php book/12.
I think now it is clear to you.
Thanks
UNIQUEmark on thatslug-field so it can never conflict.