Re: [PHP-DB] Cookies with databases

2004-10-22 Thread Bastien Koert
Run the setcookie code, and open the folder where your browser stores its 
cookies. Look for your cookie and see it whats in it is what you expect. 
Another suggestions is to echo out the code before you execute it to see if 
the values you expected are there

echo "setcookie ('USERcookie', "$user");";
Bastien

From: "Jason T. Davidson" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Cookies with databases
Date: Thu, 21 Oct 2004 22:38:02 -0500
Bastien-
I took out the quotes (as I noticed after the fact that I didn't need them) 
however this did not help.

"is the user cookie set"  This I do not know as I am trying to test this on 
that second page.  I get nothing, so I am assuming that it isn't set, 
however the first one $cid is working just fine, but it's variable doesn't 
come from a database.

--
Jason Davidson
Bastien Koert wrote:
Hi Jason,
1. I don't think you need the quotes around the values.
2. is the user cookie set?
bastien

From: "Jason T. Davidson" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Cookies with databases
Date: Wed, 20 Oct 2004 19:54:54 -0500
I am trying to set a cookie with a value from a database.  Here is my 
script:



//Table Name
$main_tbl = "MAIN"
?>

if($Message == "NoAccess"){
echo("You do not have access to that 
page!\n");
include ("staff_code/admin_links.php");
}
if($check[PASSWORD] != $_REQUEST[password]){
header("Location:staff_login.php?Message=Invalid");
}
if(($check[PASSWORD] == $_REQUEST[password]) AND ($check[USER] == 
"A")) {
include ("staff_code/admin_links.php");
$user = $check[USER];
}
else{
include ("staff_code/controller_links.php");
}
?>

Then on the second page it is reading the cookies, but it will display 
the CIDcookie, but not the USERcookie.  Here is the script on the second 
page:




ZMP ARTCC:  Staff To Do List






ZMPs Staff TO Do 
List






Completed 
Tasks


Date Finished
Task
Status


  10-13-04
  DLH SOP (new)
  Awaiting finish of other 
projects
  

  10-18-04
  ZMP Policies
  "
  






Tasks Awaiting VATUSA 
Approval


  Date Sent
  Task
  Status


  10-09-04
  LNK SOP (new)
  Awaiting approval
  

  10-19-04
  M98 SOP
  Awaiting Approval
  

  10-19-04
  General SOP
  Awaiting Approval
  




So I am assuming that somewhere in my first page that my cookie isn't 
actually gettting set properly.  I have tried many varitites and can't 
find any help sections on cookies from a database.  Any help would be 
appreciated!

--
Jason Davidson
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Cookies with databases

2004-10-21 Thread Jason T. Davidson
Tyler-
I have been to that section of php.net many times.  My first cookie 
($cid) doesn't have them domain listed and works just fine.  Don't see I 
would need it for the cookie ($user)?

--
Jason Davidson
Tyler Replogle wrote:
Yes you need to set the string domain
http://us2.php.net/manual/en/function.setcookie.php
that url should help you
From: "Jason T. Davidson" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Cookies with databases
Date: Wed, 20 Oct 2004 19:54:54 -0500
MIME-Version: 1.0
Received: from pb1.pair.com ([216.92.131.4]) by mc8-f21.hotmail.com 
with Microsoft SMTPSVC(5.0.2195.6824); Wed, 20 Oct 2004 18:10:29 -0700
Received: (qmail 42118 invoked by uid 1010); 21 Oct 2004 01:10:20 -
Received: (qmail 95202 invoked by uid 1010); 21 Oct 2004 00:55:20 -
X-Message-Info: JGTYoYF78jECeNGc3phkjLz5nkZbete3
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: 
list-unsubscribe: 
list-post: 
Delivered-To: mailing list [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Organization: UND Aerospace Foundation
User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913)
X-Accept-Language: en-us, en
X-Posted-By: 24.197.179.243
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 21 Oct 2004 01:10:29.0559 (UTC) 
FILETIME=[C167FC70:01C4B70A]

I am trying to set a cookie with a value from a database.  Here is my 
script:



//Table Name
$main_tbl = "MAIN"
?>

if($Message == "NoAccess"){
echo("You do not have access to that 
page!\n");
include ("staff_code/admin_links.php");
}
if($check[PASSWORD] != $_REQUEST[password]){
header("Location:staff_login.php?Message=Invalid");
}
if(($check[PASSWORD] == $_REQUEST[password]) AND ($check[USER] == 
"A")) {
include ("staff_code/admin_links.php");
$user = $check[USER];
}
else{
include ("staff_code/controller_links.php");
}
?>

Then on the second page it is reading the cookies, but it will display 
the CIDcookie, but not the USERcookie.  Here is the script on the 
second page:




ZMP ARTCC:  Staff To Do List






ZMPs Staff TO Do 
List






Completed 
Tasks


Date Finished
Task
Status


  10-13-04
  DLH SOP (new)
  Awaiting finish of other 
projects
  

  10-18-04
  ZMP Policies
  "
  






Tasks Awaiting VATUSA Approval


  Date Sent
  Task
  Status


  10-09-04
  LNK SOP (new)
  Awaiting approval
  

  10-19-04
  M98 SOP
  Awaiting Approval
  

  10-19-04
  General SOP
  Awaiting Approval
  




So I am assuming that somewhere in my first page that my cookie isn't 
actually gettting set properly.  I have tried many varitites and can't 
find any help sections on cookies from a database.  Any help would be 
appreciated!

--
Jason Davidson
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Check out Election 2004 for up-to-date election news, plus voter tools 
and more! http://special.msn.com/msn/election2004.armx
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Cookies with databases

2004-10-21 Thread Jason T. Davidson
Bastien-
I took out the quotes (as I noticed after the fact that I didn't need 
them) however this did not help.

"is the user cookie set"  This I do not know as I am trying to test this 
on that second page.  I get nothing, so I am assuming that it isn't set, 
however the first one $cid is working just fine, but it's variable 
doesn't come from a database.

--
Jason Davidson
Bastien Koert wrote:
Hi Jason,
1. I don't think you need the quotes around the values.
2. is the user cookie set?
bastien

From: "Jason T. Davidson" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Cookies with databases
Date: Wed, 20 Oct 2004 19:54:54 -0500
I am trying to set a cookie with a value from a database.  Here is my 
script:



//Table Name
$main_tbl = "MAIN"
?>

if($Message == "NoAccess"){
echo("You do not have access to that 
page!\n");
include ("staff_code/admin_links.php");
}
if($check[PASSWORD] != $_REQUEST[password]){
header("Location:staff_login.php?Message=Invalid");
}
if(($check[PASSWORD] == $_REQUEST[password]) AND ($check[USER] == 
"A")) {
include ("staff_code/admin_links.php");
$user = $check[USER];
}
else{
include ("staff_code/controller_links.php");
}
?>

Then on the second page it is reading the cookies, but it will display 
the CIDcookie, but not the USERcookie.  Here is the script on the 
second page:




ZMP ARTCC:  Staff To Do List






ZMPs Staff TO Do 
List






Completed 
Tasks


Date Finished
Task
Status


  10-13-04
  DLH SOP (new)
  Awaiting finish of other 
projects
  

  10-18-04
  ZMP Policies
  "
  






Tasks Awaiting VATUSA Approval


  Date Sent
  Task
  Status


  10-09-04
  LNK SOP (new)
  Awaiting approval
  

  10-19-04
  M98 SOP
  Awaiting Approval
  

  10-19-04
  General SOP
  Awaiting Approval
  




So I am assuming that somewhere in my first page that my cookie isn't 
actually gettting set properly.  I have tried many varitites and can't 
find any help sections on cookies from a database.  Any help would be 
appreciated!

--
Jason Davidson
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Cookies with databases

2004-10-20 Thread Bastien Koert
Hi Jason,
1. I don't think you need the quotes around the values.
2. is the user cookie set?
bastien

From: "Jason T. Davidson" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Cookies with databases
Date: Wed, 20 Oct 2004 19:54:54 -0500
I am trying to set a cookie with a value from a database.  Here is my 
script:



//Table Name
$main_tbl = "MAIN"
?>

if	($Message == "NoAccess"){
	echo("You do not have access to that 
page!\n");
	include ("staff_code/admin_links.php");
	}
if	($check[PASSWORD] != $_REQUEST[password]){
	header("Location:staff_login.php?Message=Invalid");
	}
if	(($check[PASSWORD] == $_REQUEST[password]) AND ($check[USER] == "A")) {
	include ("staff_code/admin_links.php");
	$user = $check[USER];
	}
else{
	include ("staff_code/controller_links.php");
	}
?>

Then on the second page it is reading the cookies, but it will display the 
CIDcookie, but not the USERcookie.  Here is the script on the second page:




ZMP ARTCC:  Staff To Do List






ZMPs Staff TO Do 
List





	
		Completed Tasks
	
	
		Date Finished
	Task
	Status
	
	
	  10-13-04
	  DLH SOP (new)
	  Awaiting finish of other projects
  
	
	  10-18-04
	  ZMP Policies
	  "
  




	
		
		Tasks Awaiting VATUSA Approval
	
	
	  Date Sent
  Task
  Status
	
	
	  10-09-04
	  LNK SOP (new)
	  Awaiting approval
  
	
	  10-19-04
	  M98 SOP
	  Awaiting Approval
  
	
	  10-19-04
	  General SOP
	  Awaiting Approval
  




So I am assuming that somewhere in my first page that my cookie isn't 
actually gettting set properly.  I have tried many varitites and can't find 
any help sections on cookies from a database.  Any help would be 
appreciated!

--
Jason Davidson
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Cookies with databases

2004-10-20 Thread Tyler Replogle
Yes you need to set the string domain
http://us2.php.net/manual/en/function.setcookie.php
that url should help you
From: "Jason T. Davidson" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Cookies with databases
Date: Wed, 20 Oct 2004 19:54:54 -0500
MIME-Version: 1.0
Received: from pb1.pair.com ([216.92.131.4]) by mc8-f21.hotmail.com with 
Microsoft SMTPSVC(5.0.2195.6824); Wed, 20 Oct 2004 18:10:29 -0700
Received: (qmail 42118 invoked by uid 1010); 21 Oct 2004 01:10:20 -
Received: (qmail 95202 invoked by uid 1010); 21 Oct 2004 00:55:20 -
X-Message-Info: JGTYoYF78jECeNGc3phkjLz5nkZbete3
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: 
list-unsubscribe: 
list-post: 
Delivered-To: mailing list [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Organization: UND Aerospace Foundation
User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913)
X-Accept-Language: en-us, en
X-Posted-By: 24.197.179.243
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 21 Oct 2004 01:10:29.0559 (UTC) 
FILETIME=[C167FC70:01C4B70A]

I am trying to set a cookie with a value from a database.  Here is my 
script:



//Table Name
$main_tbl = "MAIN"
?>

if	($Message == "NoAccess"){
	echo("You do not have access to that 
page!\n");
	include ("staff_code/admin_links.php");
	}
if	($check[PASSWORD] != $_REQUEST[password]){
	header("Location:staff_login.php?Message=Invalid");
	}
if	(($check[PASSWORD] == $_REQUEST[password]) AND ($check[USER] == "A")) {
	include ("staff_code/admin_links.php");
	$user = $check[USER];
	}
else{
	include ("staff_code/controller_links.php");
	}
?>

Then on the second page it is reading the cookies, but it will display the 
CIDcookie, but not the USERcookie.  Here is the script on the second page:




ZMP ARTCC:  Staff To Do List






ZMPs Staff TO Do 
List





	
		Completed Tasks
	
	
		Date Finished
	Task
	Status
	
	
	  10-13-04
	  DLH SOP (new)
	  Awaiting finish of other projects
  
	
	  10-18-04
	  ZMP Policies
	  "
  




	
		
		Tasks Awaiting VATUSA Approval
	
	
	  Date Sent
  Task
  Status
	
	
	  10-09-04
	  LNK SOP (new)
	  Awaiting approval
  
	
	  10-19-04
	  M98 SOP
	  Awaiting Approval
  
	
	  10-19-04
	  General SOP
	  Awaiting Approval
  




So I am assuming that somewhere in my first page that my cookie isn't 
actually gettting set properly.  I have tried many varitites and can't find 
any help sections on cookies from a database.  Any help would be 
appreciated!

--
Jason Davidson
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Check out Election 2004 for up-to-date election news, plus voter tools and 
more! http://special.msn.com/msn/election2004.armx

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php