Language selection script in progress?!
Posted: Tue Nov 25, 2008 6:36 pm
The thing is I have some (most html) code, and I want to make language selection possible using coockies for one week for the three languages... Now I dont know how to first check whether there allready is a coockie, hen creating it (i made a suggestion), and then take the selction with $_GET but I'm learning, and people advise me all kind of page on http://www.php.net, but I dont see anymore how to do it... Can anyone give some help here?? Many thanks,
the script:
the script:
Code: Select all
<?php
// 1 uur
setcookie("language", $language, time()+604800);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Welkom</title>
<meta name="keywords" content="" />
</script>
</head>
<body><p></p>
<TABLE width="700" height="132" BORDER="0" ALIGN="center">
<TR>
<TD WIDTH="214" HEIGHT="38"><div align="center"><form action="/nl" method="POST">
<a href="nl" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('nederlands','','invoeren.over.png',0)"><img src="invoeren.out.png" name="nl" border="0" id="nederlands" /></a>
</form>
</div></TD>
<TD WIDTH="20"> </TD>
<TD WIDTH="210"> <form action="/eng" method="POST">
<div align="center"><a href="/eng" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('english','','submit.over.png',1)"><img src="submit.out.png" name="eng" border="0" id="english" /></a></div>
</form> </TD>
<TD WIDTH="20"> </TD>
<TD width="214">
<div align="center">
<form action="/fr" method="POST">
<a href="/fr" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('francais','','introduire.sur.png',0)"><img src="introduire.dehors.png" name="fr" width="132" height="24" border="0" id="francais" /></a>
</form>
</div></TD></TR> <TR>
<TD HEIGHT="80" valign="top"><div align="center"><span class="style11">Welkom</span><a href="http://www.mijnwebsite.com/fr/" title="1" class="style9"> </a></span></div></TD>
<TD></TD>
<TD HEIGHT="80" valign="top"><div align="center"><span class="style11">Welcome</span><a href="http://www.mijnwebsite.com/fr/" title="2" class="style9"> </a></span></div></TD>
<TD></TD>
<TD valign="top"><div align="center"><span class="style11"> Bienvenue</span><span class="style8"><a href="http://www.mijnwebsite.com/fr/" title="3" class="style9"> </a></span></div></TD>
</TR>
</TABLE>
<p> </p>
<div align="center">
<p>
</p>
</div>