View difference between Paste ID: 3ktLJtL3 and DpS8inMK
SHOW: | | - or go back to the newest paste.
1
<?php
2
$userid=$_SESSION['userid'];
3
include_once('./globals.php');
4-
    $db->query('UPDATE `users` SET `tutorial` = -1 WHERE (`userid` = '. $_SESSION['userid'] .');');
4+
5
    $db->query('UPDATE `users` SET `tutorial` = tutorial` -1 WHERE `user` = $userid');
6
    header('Location: index.php');
7-
if(isset($_GET['skip'])) {
7+
8-
    $db->query('UPDATE `users` SET `tutorial` = `tutorial` + 1 WHERE (`userid` = '. $_SESSION['userid'] .');');
8+
else if(isset($_GET['skip'])) {
9
    $db->query('UPDATE `users` SET `tutorial` = `tutorial` + 1 WHERE `userid` = $userid');
10
	header('Location: index.php');    
11
}