Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7090333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:02:20+00:00 2026-05-28T08:02:20+00:00

I just started using the CakePHP framework, 2.0 to be precise. I read most

  • 0

I just started using the CakePHP framework, 2.0 to be precise. I read most of the documentation and examples and came across the blog tutorial.

http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/part-two.html#editing-posts
In the “edit post” section of the tutorial I saw they were using a hidden field to remember the post id. Isn’t this bad practice because of client side modifications?

The way I handled this is remove the hidden field, and when the form is submitted add the post id to the POST data before saving and validating it. Is this the correct way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:02:21+00:00Added an answer on May 28, 2026 at 8:02 am

    yes, thats pretty much the right way if you are concerned about tampering with the data.
    if the record belongs to a certain user you need to make sure that this user can’t just replace the id with the one of an other user’s record.
    the security component does NOT help here either (at least for some aspects).

    read more about it here:
    http://www.dereuromark.de/2010/09/21/saving-model-data-and-security/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started using CakePHP for a small project. I have rails experience, and
I just started using CakePHP and it's very different from just normal procedural or
Just started using the Ace editor (http://ace.ajax.org) and although it works fine on a
Just started using Apache Commons StringEscapeUtils . According to http://www.w3schools.com/tags/ref_entities.asp , Ö should correspond
Just started using App Engine's webapp framework, but I can't figure out what's wrong
I've just started using cakephp elements and they're awesome (I used to use include).
I just recently started using MeioUpload 2.0 with cakephp 1.3. Ive configured the behaviour
just started using Zend Framework and I'm wondering what to do with odd classes
I just started using CakePHP, and am learning how to use Bake. Why does
Have just started using Google Chrome , and noticed in parts of our site,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.