So, I have am trying to do a simple search bar. The query that is entered into the search is pulled to another page. That works perfectly fine. The problem occurs when I try to use that variable in a script that increments the query's row in the database table. Everything works fine when I just put the name of a table element in instead of the variable, but I need to grab what they searched for to be able to get it to work properly.
I think you can do this with a session, but I don't want to bother with sessions for such a small project.
This is how I pull the variable from the search bar:
$query = $_GET['query'];
That works fine, but I can't get it to a new page to use in this piece of code:
mysql_query("UPDATE inventory SET Sold=Sold+1 WHERE Brand='Skittles' OR Type='Candy'");