Php skinning w/ cookies question.
Moderator: General Moderators
Oh no. Also, when I use what you suggested, It will only place the "news" info... (If that made no sense, go to: http://dumbass.ionichost.com and click all the links below (not rooster or jara).
Edit: This is what it looks like now (index.php)
feyd |
edit: bah, I was close... XD - theda
Edit: This is what it looks like now (index.php)
Code: Select all
<?php
include("ver.php");
// Style settings
include($ver."/style.php");
// Page identification
if (isset($id)) {
$id = $id;
} else {
$id = $ver."/news";
}
switch($ver)
{
case 'de':
switch($id)
{
case 'link':
case 'cont':
$sec_i = 'Wenn Sie diese Netplatz magen, dann hier ist, alles das Sie möchten.';
break;
case 'gallery':
$sec_i = 'Schauen Sie durch meinen Galerien und bemängeln Sie mir, dass Sie möchten.';
break;
case 'news':
default:
$sec_i = 'Lesen Sie über meinem Leben und machen Sie eiligen Urteile.';
break;
}
break;
case 'en':
default:
switch($id)
{
case 'link':
case 'cont':
$sec_i = 'If you actually like what is on this site, all the information you need is here.';
break;
case 'gallery':
$sec_i = 'Look through snapshots of my life and criticize them as you feel.';
break;
case 'news':
default:
$sec_i = 'Read about my eventful life here and make your judgements swiftly.';
break;
}
break;
}
// Begin output of page...
include($ver."/content.php");
?>
<noscript>feyd |
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
all your links refer to $ver/script_name
the code is built to use 'script_name' (minus quotes)
it is dangerous to blindly include a file :: e.g. http://dumbass.ioinchost.com/?id=not_here
viewtopic.php?t=25394
the code is built to use 'script_name' (minus quotes)
it is dangerous to blindly include a file :: e.g. http://dumbass.ioinchost.com/?id=not_here
viewtopic.php?t=25394
No. I currently set $ver to "en". ($ver = "en")
Edit: That's because I could never get a cookie saved ^_^
All I need now, (Which is what I started out with)
1. setcookie() function page ("set.php") that I can do "set.php?set=en/de" and it will save a cookie with either en or de.
2. open that same cookie when I load index.php (which currently, to get $ver, it opens a second page ver.php) and detect what $ver should turn into.
Edit: That's because I could never get a cookie saved ^_^
All I need now, (Which is what I started out with)
1. setcookie() function page ("set.php") that I can do "set.php?set=en/de" and it will save a cookie with either en or de.
2. open that same cookie when I load index.php (which currently, to get $ver, it opens a second page ver.php) and detect what $ver should turn into.