There is no problem in my code it's running fine but i want some suggestion.I have edit profile page for user when user is login he can click on edit profile button to edit his profile but i have what i we generally see is when user click on edit profile url must have like www.example.com/edit/user_id=1 or something similar like where in url there is always user id is present.I developed a edit page it has url like http://localhost/ko/Update_profile/get_user_data when log in user is has this url it can edit his profile so i have doubt is i am doing something wrong ??
i think you are going in right way but your saying that you were using codeigniter framework right
so please have a lok at your code in get_user_data.php[file something like this in your project ] like how that page accessing the inputs from ui by using post parameters or some other way.
if you go this way you will find the answer
all the best
correct me if i am wrong.
by ihelpyou: giving clarity
You can certainly do it like this, however, you MUST check that the user_id in the url is the same as that held in the session user_id, otherwise a miscreant would be able to edit anybody's profile just ny changing the url and pressing enter!
Most modern sites use mod_rewriting / RESTful API to do this type of thing, so profiles/1/edit would be a suitable url.
Could also work for you, but there you will be taking the user_id directly from the session data, not the url. I haven't used CI for a few years and I can't remember using pretty urls like Laravel does (via routing file). Think about all the pages you have and formulate a url strategy - i.e. are they all going to be custom or are you going to develop a CRUD-type system,e.g.