Saving vote for comment on tag "$tag_html"\n"; $dsn = "mysqli://$user:$passwd@$host/$db"; $conn =& DB::connect($dsn); if (DB::isError($conn)) { die ("Cannot connect: " . $conn->getMessage() . "\n"); } $change = "0"; if($vote == "up") { $change = "1"; } else if ($vote == "down") { $change = "-1"; } else { echo "Don't try to play with the URL I don't like that\n"; } $updatescore =& $conn->prepare("UPDATE tagcomments SET score=score+? WHERE id=?"); $result =& $conn->execute($updatescore, array($change, $id)); if (DB::isError($result)) { die ("UPDATE failed: " . $result->getMessage() . "\n"); } $conn->disconnect(); echo "Back to $tag_html\n"; echo "Back to index page\n"; ?>