Setting cookie and refreshing.
Posted: Mon Jan 16, 2012 4:55 am
Hi,
I am trying to set a language cookie.
I have a row of different flags which all have values and set a language cookie.
However i can only redirect to the homepage, and i just want to refresh the current page.
Here is my php script......
<?php
setcookie("lang", urlencode($_GET["lang"]));
$url = "http://www.bertgroup.co.uk/?q=node/16";
header( "Location: $url" );
?>
And the html i am using to link to the script.......
<a class="no_underline" href="setlang.php?lang=EN"><img class="header_language_flags" src="images/flag_EN.jpg" value="EN"/>
<a class="no_underline" href="setlang.php?lang=FR"><img class="header_language_flags" src="images/flag_FR.jpg" value="FR">
Thanks,
Rob
I am trying to set a language cookie.
I have a row of different flags which all have values and set a language cookie.
However i can only redirect to the homepage, and i just want to refresh the current page.
Here is my php script......
<?php
setcookie("lang", urlencode($_GET["lang"]));
$url = "http://www.bertgroup.co.uk/?q=node/16";
header( "Location: $url" );
?>
And the html i am using to link to the script.......
<a class="no_underline" href="setlang.php?lang=EN"><img class="header_language_flags" src="images/flag_EN.jpg" value="EN"/>
<a class="no_underline" href="setlang.php?lang=FR"><img class="header_language_flags" src="images/flag_FR.jpg" value="FR">
Thanks,
Rob