At the moment of constructing the string of your query you must concatenate the variable so that it prints it within the same string:
$ cat = $ _POST ['cat'];
$ veri="SELECT * FROM category WHERE name = '". $ cat. "'";
Now, if you will use MySQLI for objects you must do:
$ result = $ db-> query ($ veri);
You can also use the prepare form to concatenate variables in your consumption:
// you must prepare the query substituting where the variable will go for a? ...
$ prepare = $ db-> prepare ('SELECT * FROM category WHERE name =?');
// now you dump the variables using bind_param where you must first indicate the type of variable you expect and then the variable ...
$ prepare-> bind_param ('s', $ cate);
// execute the query ...
$ prepare-> execute ();
With this you can easily use variables within the queries with the advantage that doing so with the prepare automatically applies a mysqli_real_escape_string