GetOne($sql); } $dbh = connectDB($db[0], 0, 0); authRedirect(1); $uid = $_SESSION['UID']; $di = $_SESSION['DI']; $taken_bbp_before = tookIt($dbh, $uid, $di, 291); //di=934 test $taken_bbp_before = tookIt($dbh, $uid, $di, 2515575); $full_count = intval($taken_bbp_before); $whichurl = $full_count % 4; switch($whichurl){ case 0: redirect("https://www.publicschoolworks.com/Training/psw_bbp_schools/index.html"); break; case 1: redirect("https://www.publicschoolworks.com/Training/psw_bbp_schools_refresher/index.html"); break; case 2: redirect("https://www.publicschoolworks.com/Training/psw_bbp_schools_refresher1/index.html"); break; case 3: redirect("https://www.publicschoolworks.com/Training/psw_bbp_schools_refresher2/index.html"); break; default: redirect("https://www.publicschoolworks.com/Training/psw_bbp_schools/index.html"); break; } ?>