i have this code
<?php
if(isset($_GET['qry'])) {
echo $_GET['qry'];
}
else if(isset($_GET['ct'])) {
echo $_GET['ct'];
}
else if(isset($_GET['sct'])) {
echo $_GET['sct'];
}
else if(isset($_GET['brand'])) {
echo $_GET['brand'];
}
else {
echo "";
}
?>
how do i properly protect the value i get from the page url from sql injection or other things since i use the value on the page or database.
I have searched and am seeing different method, please which do you think is the best way.