If no variable is present in the URL
Moderator: General Moderators
If no variable is present in the URL
I have a page, and if you just call the rankings.php page nothing shows, but if you call the variable in the url like so rankings.php?week=1 it shows the information I want. Now I just want to know if someone types in rankings.php I would like it to just print the latest week anyway, how do I look to the URL and see if there is a variable there?
e.g.
Code: Select all
<?php
if (!isset($_GET['week']) || (int)$_GET['week'] < 1)
$_GET['week'] = 1;
?>