the first page should set the cookie.feyd wrote:visiting http://dumbass.ionichost.com/set.php?ver=en
then http://dumbass.ionichost.com/ should display data
Php skinning w/ cookies question.
Moderator: General Moderators
I just switched it to
"$ver = $HTTP_COOKIE_VARS["language"];"
and all I get is "cannot get .blah" It's missing the "en" or "de" before the period.
I did blah.com/set.php?set=en and it didn't do anything.
set.php still has:
"$ver = $HTTP_COOKIE_VARS["language"];"
and all I get is "cannot get .blah" It's missing the "en" or "de" before the period.
I did blah.com/set.php?set=en and it didn't do anything.
set.php still has:
Code: Select all
<?
setcookie("language", $ver, time()+604800);
?>
<noscript>- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
notice the difference in the urls you used and mine.visiting http://dumbass.ionichost.com/set.php?ver=en
then http://dumbass.ionichost.com/ should display data
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Just add
Right after your last line of code in set.php 
Code: Select all
header('location: index.php');Thanks. All works fine. One of my friends tried to view my website (1/5 people who did this) and said there was an error. I put a "setcookie" in index.php (and renamed the original index.php to main.php) and had to set one, then redirect to the main page... But for some reason he kept getting an error (pretty much nothing wanted to load the $ver var...). It was solved easily by having him go to set.php?ver=en and have him set a cookie that way. I dont know how many other people will have this problem, but it is working dandy. Thanks.