<?php $id = intval($pg->params[1]); $db->query("UPDATE db_teaser SET views = views - '1' WHERE id = '$id'"); $sm = $db->query("SELECT * FROM db_teaser WHERE id = '$id'")->fetchArray(); $sm = $sm['url_teaser']; header("Location: $sm"); ?>