What I have so far is something like this:
mysite.com/page.php?en=true
or I can do this...
mysite.com/page.php?en=1
What I'm trying to do is make it so that the URL does not need the =true or =1
I want it to look just like this:
mysite.com/page.php?en
for the English version or:
mysite.com/page.php?admin
for the administration page or whatever I feel is necessary after the ?
The code that I have now is this:
<?php
function writePageLanguage() {
$de = '(deutsch)';
$en = '(English)';
$es = '(español)';
$fr = '(français)';
$it = '(italiano)';
if ($_GET["de"] == true) {
echo $de;
}
elseif ($_GET["en"] == true) {
echo $en;
}
elseif ($_GET["es"] == true) {
echo $es;
}
elseif ($_GET["fr"] == true) {
echo $fr;
}
elseif ($_GET["it"] == true) {
echo $it;
}
else {
echo $en;
}
}
?>
The above code is function I'm planning on using inside the HTML title tag:
<title>My website <?php writePageLanguage(); ?></title>
I'm stuck on what to do next!

New Topic/Question
Reply



MultiQuote







|