PHP/mysql/form problem?

JackAttack

New member
I've made a dropdown list in a form which when selected and submitted accesses a Mysql database table.The results returned are placed in a matrix and each row is accessed by a different form that increments the matrix result by adding 1 or subtracting 1 to return to previous row.
The trouble i'm having is if i assign the mysql query to a variable it shows the first result but then resets if i try to increment using the second form.
If i assign the mysql query to a definite term e.g SELECT * WHERE animal="frog" it works ok.
But something like SELECT * WHERE animal="$animal" only works for first row then resets if you try to click through the results.
 
The best way to solve such a problem is echo the query formed at run time(on submission of the form) and try running the query manually in phpMyAdmin or observe if the query formed is correct. Maybe the query formation isn't going correct. There isn't any problem with the quotes.
 
Back
Top