University
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: KANM MD [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 10:39 PM
Subject: Re: [PHP] Question Regarding Cookies, Sent Headers, and Functions
That Return Values
Hey Aggie,
Show us the rst
Forgive if this is not the answer to the problem. I think he means a
blank line at the beginning of the file before the ?
If you have anything before the ? it gets sent to the browser, and thus
headers have already been sent (This is the same for print statements, etc).
--Joseph Guhlin -
-Original Message-
From: KANM MD [mailto:[EMAIL PROTECTED]]
Sent: 11 December 2002 08:55
Here is the code in a readable form (alterations for
security, simplicity
...)
if
((stristr($HTTP_SERVER_VARS[remote_address],XXX.YYY.ZZZ))|
|($pwprotect==
'password')) {
PROTECTED]
To: Rick Emery [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 2:54 AM
Subject: Re: [PHP] Question Regarding Cookies, Sent Headers, and Functions That Return
Values
Here is the code in a readable form (alterations for security, simplicity
...)
if
((stristr
Here's my question:
I'm running code that essentially checks for either a certain IP address or a password
before it sends a cookie. However, when I try to send the cookie, I get the standard
Error - headers already sent when I haven't output anything. After some spot
debugging, I found that
Hey Aggie,
Show us the rst of the code. stristr() should not be a problem. Chances are there's a
blank line elsewhere that's being sent.
- Original Message -
From: KANM MD [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 2:34 PM
Subject: [PHP] Question Regarding
Hello,
I am having a problem testing out the use of cookies. I'm using a
tutorial from Wrox's Beginning PHP4. It seems that I'm doing
everything correctly, but when I try to access the page in my browser, I
am not prompted as to whether or not I'd like to accept a cookie (which
is
Erik
What code are you using to set your cookie?
Are you certain the expiry date is in the future?
What browser are you using? There are notes in the online manual
(www.php.net/setcookie()) regarding IE.
Miles
On Wednesday 26 December 2001 04:01 pm, Erik Price wrote:
Hello,
I am having a
Erik,
1. Did you just try setting a cookie, plain, with no conditions.
2. Have you tested your conditions, or added a test, equivalent to what you
do when you set the cookie? In other words, change setcookie to this
if ($type_sel)
{
setcookie(font[type], $type_sel, time()+3600) ;
Good advice -- I hadn't thought of that (echoing right beneath the
setcookie() function). But then i thought of something else... how can
I echo text before the html tag? So I put a third setcookie()
function above the html tag
setcookie(foo, echobar)
hoping that this would be very simple
Miles, et al:
I realized my problem today, with the cookies.
While reading the voluminous setcookie() function description (meaning
the user notes at the bottom), I came across a sample script that
[EMAIL PROTECTED] had written to test to see if a browser is working with
cookies correctly.
11 matches
Mail list logo