$update_table = "UPDATE menu SET rating = $_POST[$rating] WHERE doc_id = $row[doc_id]";
Why is this not possible?
I am getting a error saying the syntax is wrong but i cannot see whats wrong.
Thanks Jermizzle
$update_table = "UPDATE menu SET rating = '$_POST[$rating]' WHERE doc_id = '$row[doc_id]'";
Try that. You need single quotes around your variables.
Its working now thanks rgermain
The above code looks wrong:
I think maybe you need to enable error_reporting(E_ALL) and fix all warnings and notices which are generated.
Mark
Good catch Mark, but I am guessing since they said it is working now. And not "That worked", that they figured out all the mistakes by themselves. Without my intervention and errors! 🙂