Recommended method to pass variables in HTML/PHP? -
hi have simple question: recommended way pass variables when working on site. - get, post, session, cookies, hidden fields, ...
- get when showing data
- post when modifying data
- session when storing data between requests doesn't need stay after session expires
- database (or other persistent storage) data needs hang around between sessions
cookies; more or less never. put there better stored in session. perhaps persistent logins, only.
hidden fields; again, never, use session , keep data safe on server. used storage points data collected via javascript, that's it.
Comments
Post a Comment