Never mind I got it working myself, here is how I have done it for anyone else that wants this kind of thing.
In the file index.php, I have written;
<?php
if (!isset($redirect)) {
echo ("
<form method='post' action='setcookie.php' name='barns_select'>
<input type='hidden' name='barns'><input type='Submit' name='redir' value='barnsley'>
</form>
<form method='post' action='setcookie.php' name='shef_select'>
<input type='hidden' name='shef'><input type='Submit' name='redir' value='sheffield'>
</form>
");
}
else if ($redirect == true) {
header("Location: redir.php");
}
?>
In setcookie.php, I have written;
<?php
setcookie ("redirect", $redir,time()+3600); // expire in 1 hour
header("Location: redir.php");
?>
And finally, in redir.php, I have written:
<?php
echo ("
<html>
<head>
<meta http-equiv='refresh' content='4;url=http://www.$redirect.co.uk/'>
<title>Redirect</title>
</head>
<body>
Redirecting.....hold on to your seats !!
</body>
</html>
");
?>
Which redirects to http://www.barnsley.co.uk if barnsley button is clicked and when returned to forwards you straight to the website aforementioned until cookie expires or is deleted by the viewer. Same principles apply to the sheffield button.
Basically whatever value the submit button is, i.e; the text of it which is displayed on the form, is the text sent through for the redirection. I am going to be using subdomains so it fits my uses. I'm sure theres a better way of doing it but I'm not doing anymore on it, I'm sick of seeing it in fact! lol
Php RULES!!
Peace Out