hi guys
im tryin to make a rating snippet, but for sum reason the db update wont work =/
buildup:
ive got a snippet in modx which creates a list of buttons (1-10 = for the ratings),
these call up a js function that calls up the rate.php in assets/snippets/rating
and that file looks like this (untill now):
$id = $_REQUEST['id'];
$rating = $_REQUEST['action'];
$fields = array(
"rating" => $rating,
"ratings" => 1
);
echo "bla";
$modx->db->update($fields, "media", "media_id = '$id'");
echo "blabla";
now here i get the 1st echo ’bla’ but the second ’blabla’ does not show.
as far as i can tell, it has something to do with the update.
can some one help me out here?
thank you tons!!