Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Variable "id" is set?
- if (isset($_GET['id'])) {
- // Set variable "id"
- $id = $_GET['id'];
- // Create whitelist
- $whitelist = array(1, 3, 5);
- // Check if element is in array
- if (in_array($id, $whitelist)) {
- // Do something...
- } else {
- header("Location: http://xyz.de/errorpage");
- die();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement