I am printing div blocks in the loop, using associative array. I want to use keys of such arrays as a css class for each div. The thing is those keys are directly connected to database fields. Is it safe to do so? Thanks.
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.
I see no problems in that, but try to never use database field’s name in JS or HTML code. I think you can concatenate them with a prefix or change the order of the chars, so you can play around with String functions.