Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<script type="text/javascript">
function updateCounter(episode, season){
$.post(
'/ur/to/ajax.php',
{
episode: episode,
season: season
}
);
}
</script>
<button id="yes" type="submit" name="yes" onclick="updateCounter(315, 2);">blablabla</button>
$episode = (int) $_POST['episode'];
$season = (int) $_POST['season'];
if($episode > 0 && $season > 0){
$sql = "UPDATE tablica SET counter = counter + 1 WHERE episode='$episode' AND season='$season'";
mysql_query($sql) or die(mysql_error());
}