I hope someone can help me with this problem.
I have written a very simple PHP redirect script for a language selection page. It receives a language submitted from an HTML form and uses it to redirect using the header(Location"") function. The site is hosted on a Windows server with a well known UK hosting company.
The script is as follows:
Code: Select all
<?PHP
/*
PHP to redirect country based on selection
*/
//Get the information sent in from the language selection
$language = $_POST['sel_lang'];
//Save the URL
$url = "../lang/".$language."/welcome.htm";
//Bounce to the correct page
header("Status: 200");
header("Location: $url");
?>
I did put the entire URL (http://www. etc) into the $url variable, but I have removed it for now so that it can't be found on this forum page.
Could someone please have a look to make sure I have not made a stupid mistake, or write if they have heard of such a Windows-specific problem before?
Many thanks!