I would like to know if it is possible to search through a $_POST variable and if a ";" is found then trigger an if statement.
For example:
if ";" is True{
XXXXXX
}
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.
Sure, use strpos to check if the character is found in your string.
You have to use a strict check (=== or !==) for the position returned. Otherwise, if strpos returns a 0 because the ; is the first character in the string, it will resolve to boolean
false, meaning the result is misinterpreted.