Is it generally considered OK to store a query string in a database?

If I were to take a query string from an incoming request HTTP request in a web application, store it directly in a MySql database, then use it later to re-build the original request url, would that be considered OK? I'm wondering if there are any "gotchas" like special characters or multi-byte characters on the query string that might require me to encode the data or something before storing it. Thank you in advance. **EDIT**: My particular use case would be something like the following. Although my main concern is more about whether or not any special characters on a query string could cause unexpected problems. - User submits a form. - During form processing, we determine that user needs to confirm their email - We send the user an email for confirmation and store the original query string in database because we always want to carry through any query string parameters that were on the request. - After the user confirms their email, we redirect them back to the original form url, and append the original query string to ensure query string parameters are carried through.
you should elaborate on your use case and provide an example

以上就是Is it generally considered OK to store a query string in a database?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准