It would be really helpful if you quit removing code. The idea of a forum is to solve problems so that others can benefit. Since I now have no idea of what you are trying to accomplish all I can say, based on what code is left, is that you cannot have html tags in your sql query. As it is, the query is meaningless. If you are trying to pull all of the data from a table, then your query would be something like 'select * from myTable'.
This should work (depending on how your server is set up):
$q = $db->query("SELECT * FROM Theme WHERE ThemeDATA='{$_POST['Theme']}'");
This is assuming that your table has a column named ThemeDATA. I suspect that you might really be looking for this:
$q = $db->query("SELECT * FROM Theme WHERE Theme='{$_POST['Theme']}'");
or
$q = $db->query("SELECT * FROM Theme WHERE Theme=" . $_POST['Theme']);
The problem is not with your php. The problem is with your sql. Programming languages work in completely consistent manners according to the rules by which they were designed.