Connecting Tech Pros Worldwide Forums | Help | Site Map

cookies and frameset

Member
 
Join Date: Mar 2008
Location: India
Posts: 100
#1: Jun 27 '09
hi

i have a page which contains
Expand|Select|Wrap|Line Numbers
  1. <frameset rows="16%,*" frameborder="1" framespacing="1">
  2. <frame src="includes/header.php" name="top" noresize="noresize">
  3. <frameset cols="200,*">
  4. <frame src="menu.php" name="left" noresize="noresize">
  5. <frame src="welcome.php?p=login" name="right" noresize="noresize">
  6. </frameset>
  7. </frameset><noframes></noframes>
  8.  
and all functions are performed inside welcome.php through including the specific pages which are mentioned in the menu page.

and when a user login i m setting a cookie value in the welcome page.,

but it is not available in other frmeset pages lik menu.php etc..

tried using the codes to set the cookie

Expand|Select|Wrap|Line Numbers
  1. setcookie("user",$user,time()+3600,'http://localhost/transframe/');
  2.  
  3. and
  4.  
  5. setcookie("user",$user,time()+3600,'/');
  6.  
  7. and
  8.  
  9. setcookie("user",$user,time()+3600);
  10.  
so i need to get the cookie value outside that particular also.,

regards
vijay

Member
 
Join Date: Mar 2008
Location: India
Posts: 100
#2: Jun 29 '09

re: cookies and frameset


Any ideas to overcome this problem?????
dlite922's Avatar
Expert
 
Join Date: Dec 2007
Location: Moon, Dark Side
Posts: 1,095
#3: Jun 29 '09

re: cookies and frameset


Only thought is, the cookie is being created while the other page is trying to request it. (get something that's not there yet).

Too early in the morning to tell.

have you tried testing your cookie scripts without frames? just create a test.php that writes a cookie then create test2.php and try to read that cookie. does it work?

One part of troubleshooting is "simplify the problem" AKA "Divide and Conquer"

Good luck,



Dan
Reply