Hi,
I have a very basic script on my web site:
<?php
// start session
// import selected size into session
session_start();
$_SESSION['colour'] = $_GET['c'];
header("Location: " . $_SERVER['HTTP_REFERER']);
?>
The only value I expect from $_GET[‘c’] is either ‘black’,‘white’ or ‘green’.
Is there any way I can filter this so the script will only accept a value from these values and exits if it receives anything different.
Thank you.