From 362a1f5af0a15242c08d1fd9e546d973ae363f83 Mon Sep 17 00:00:00 2001 From: Dhaval Prajapati <42002820+dhavz@users.noreply.github.com> Date: Fri, 2 Oct 2020 15:33:42 +0530 Subject: [PATCH] Updating for Cross SIte Scripting Protection --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 53c9d4b..4debcc2 100644 --- a/index.php +++ b/index.php @@ -30,9 +30,9 @@ foreach ($result as $key => $res) { //while($res = mysqli_fetch_array($result)) { echo ""; - echo "".$res['name'].""; - echo "".$res['age'].""; - echo "".$res['email'].""; + echo "".htmlspecialchars($res['name'], ENT_QUOTES).""; + echo "".htmlspecialchars($res['age'], ENT_QUOTES).""; + echo "".htmlspecialchars($res['email'], ENT_QUOTES).""; echo "Edit | Delete"; } ?>