0

I am using this script .

$category_name = filter_input(INPUT_GET, 'category', FILTER_SANITIZE_STRING);
$db->query("INSERT INTO `category` (name,sort) VALUES ('$category','0') ");

But if end of value of $_GET['category'] be slash fo e.g hello \ OR \ OR \ hello \ All of value dosnt save and query dosn't insert .

It's not imprtant to me save slash in database . I want just save in database whithout \ for e.g (Hello \ ) save (Hello). There are any filter_input for this ?

mrjohn
  • 63
  • 4

0 Answers0