Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 05-27-2004, 03:21 AM   #1
whee
Confirmed User
 
Join Date: Sep 2002
Location: http://www.nightstation.com
Posts: 1,375
Php / SSI include HELP! Any gurus around?

This I can't figure and would appreciate any help or clue to the solution.

I have a .shtml file in the root with:
#include file="dir/file.php"

In file.php I set a J-avascript cookie:
document.cookie='cookname=value;';

Later in another php file, I write the cookie value:
echo $cookname;

This works real fine, no problems there.
Here's the problem:

In a directory mydir, I also have a .shtml file with
#include virtual="/dir/file.php" (same file as above)

The file loads and all, but somehow the J-avascript cookie in file.php is not set!

I figure it's something with the virtual include. But virtual include is a must because the file to include is called from a directory and not the root. Therefore a #include file="yadayada" cannot be used.

I can't figure why the J-avascript cookie isn't set and written...

Any help or clue to "kick-start-my-mind" sure will be appreciated!!

__________________
http://www.nightstation.com
whee is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-27-2004, 03:27 AM   #2
bawdy
Confirmed User
 
Join Date: Feb 2002
Posts: 1,424
setcookie('cookie', 'data', time() + 3600, '/');

make sure you got that slash there... then it will work on your entire domain
bawdy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-27-2004, 03:28 AM   #3
JDog
Confirmed User
 
Join Date: Feb 2003
Location: Canby, OR
Posts: 7,453
Quote:
Originally posted by whee
This I can't figure and would appreciate any help or clue to the solution.

I have a .shtml file in the root with:
#include file="dir/file.php"

In file.php I set a J-avascript cookie:
document.cookie='cookname=value;';

Later in another php file, I write the cookie value:
echo $cookname;

This works real fine, no problems there.
Here's the problem:

In a directory mydir, I also have a .shtml file with
#include virtual="/dir/file.php" (same file as above)

The file loads and all, but somehow the J-avascript cookie in file.php is not set!

I figure it's something with the virtual include. But virtual include is a must because the file to include is called from a directory and not the root. Therefore a #include file="yadayada" cannot be used.

I can't figure why the J-avascript cookie isn't set and written...

Any help or clue to "kick-start-my-mind" sure will be appreciated!!

if globals are off, you can't do $cookiename you'd have to do $_COOKIES['cookiename']

jDoG
__________________
NSCash now powering ReelProfits.com
ALSO FEATURING: NSCash.com :: SoloDollars.com :: ReelProfits.com :: BiminiBucks.com :: VOD
PROGRAMS COMING SOON: Greedy Bucks :: Vengeance Cash
NOW OFFERING OVER 60 SITES
CONTACT :: JAMES SMITH :: CHIEF TECHNOLOGY OFFICER :: ICQ (711385133)
JDog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-27-2004, 03:51 AM   #4
whee
Confirmed User
 
Join Date: Sep 2002
Location: http://www.nightstation.com
Posts: 1,375
Whee!

The solution was to put path=/ into the J-avascript cookie setting...

Thank you guys for giving me the final clue! Appreciate.

__________________
http://www.nightstation.com
whee is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.