Eg. http://example.org/articles/edit/5
this url fetch the record which has primary key 5, but in following url
http://example.org/articles/edit/5dsadasd
this is also get same record but i pass primary key 5dsadasd.
Please tell me How to prevent them ??
ib db,
id colum is INT? in cakephp did you create form, controller and model with cake bake tools?
yes column is int type.
I think you need to modify the routing for that like below: $routes->connect(’/articles/edit/:id’, [‘controller’ => ‘Articles’,‘action’=>‘edit’],[‘id’ => ‘[0-9]’, ‘pass’ => [‘id’]]);
Try this and let me know is it working or not.