How to hide url bar showing id while editing form in cakephp 3.6.7


#1

how to hide url bar showing id while editing form in cakephp 3.6.7

this is a link
echo $this->Html->link(__(‘Edit’, true), array(‘action’=>‘edit’, $loggeduser[‘id’])) ;

url bar is:
http://localhost/cakeapp/authexs/edit/83
how to hide 83…?

please help me

thanks & regards,
Darshan


#2

How to reference posts for editing?


#3

If the id is the logged in user. Than you can just remove it from the link and manually ad it at the controller


#4

if removing id how to get exact value…?


#5

anyone give solution for the bellow error…?

Class ‘Security’ not found


#6

working fine…


#7

If you use AuthComponent than it is $this->Auth->user('id')


#8

i am using encryption and decryption method


#9

In any way you should have the user data in your session, right? :slight_smile:


#10

ya…:grinning:


#11

if any doubts ill get back to you

thanks & regards,
Darshan


#12

You can use a username field or a slug field and route the queries using the username or slug instead of the ID