commit 16311c38f96a766c71eae15edbdbdfa2c8c8acba
parent ebb998a9ef2df4b49b394374decce2500620c3af
Author: John Kubach <johnkubach@gmail.com>
Date: Wed, 19 Dec 2018 17:06:06 -0500
mysql cleanup
add escape string on question input
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/website/res/submit-questions.php b/website/res/submit-questions.php
@@ -21,7 +21,7 @@ for($counter = 0; $counter < sizeof($questions); $counter++)
}
for($counter = 0; $counter < sizeof($questions); $counter++){
- $q = $questions[$counter];
+ $q = mysqli_real_escape_string($connect, $questions[$counter]);
echo "Question #".($counter + 1).": ".$questions[$counter]."<br />";
$sql = "INSERT INTO question (survey_id, question_number, question_content)
VALUES ('$survey_id', $counter + 1, '$q');";