Do I need to escape variables if they are used only for running through isset()?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Unless you’re going to later insert that value into a database, there’s nothing they can do.
isset("test');DROP TABLE users;--");would return “true”, but do absolutely nothing.If you are planning on using it later however, use
addslashes()ormysql_real_escape_string.But no, isset cannot do anything bad.