Re: [PHP] Question Regarding Cookies, Sent Headers, and Functions That Return Values

2002-12-11 Thread KANM MD
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

Re: [PHP] Question Regarding Cookies, Sent Headers, and FunctionsThat Return Values

2002-12-11 Thread bahwi
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 -

RE: [PHP] Question Regarding Cookies, Sent Headers, and Functions That Return Values

2002-12-11 Thread Ford, Mike [LSS]
-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')) {

Re: [PHP] Question Regarding Cookies, Sent Headers, and Functions That Return Values

2002-12-11 Thread Rick Emery
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

[PHP] Question Regarding Cookies, Sent Headers, and Functions That Return Values

2002-12-10 Thread KANM MD
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

Re: [PHP] Question Regarding Cookies, Sent Headers, and Functions That Return Values

2002-12-10 Thread Rick Emery
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

[PHP] question regarding cookies

2001-12-26 Thread Erik Price
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

Re: [PHP] question regarding cookies

2001-12-26 Thread Miles Thompson
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

Re: [PHP] question regarding cookies

2001-12-26 Thread Miles Thompson
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) ;

Re: [PHP] question regarding cookies

2001-12-26 Thread Erik Price
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

Re: [PHP] question regarding cookies

2001-12-26 Thread Erik Price
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.