Let's say you're making a blog application, and you're trying to decide how to build the comment form for a particular post. Would you
- put the
blog_post_id
as a hidden form field in the comment form, or would you - set the form action to
post_comment?blog_post_id=<id>
and then grab it from theGET
variable instead?
Why?
My 2 cents:
If you put it into POST, then all your variables are in a consistent location when you're trying to process the form. However, I find that often the blog_post_id
will be in the URL anyway, so you're sending a tiny bit of extra unneeded data (and have to go through the work of printing the hidden field).