Loading ...
Sorry, an error occurred while loading the content.

RE: [PBML] Getting things in the right order.. (an effort to be b rief)

Expand Messages
  • Adrian Stovall
    try adding another n at the end of your Set-Cookie line.
    Message 1 of 1 , Oct 11, 2001
    • 0 Attachment
      try adding another \n at the end of your Set-Cookie line.

      >-----Original Message-----
      >From: Franki [mailto:frankieh@...]
      >Sent: Thursday, October 11, 2001 3:19 PM
      >To: perl-beginner@yahoogroups.com
      >Subject: [PBML] Getting things in the right order.. (an effort to be
      >brief)
      >
      >
      >
      >Hi everyone,,
      >
      >First, let me apologise for being a pain,
      >
      >I have another small question I'd like to beg your indulgance with..
      >
      >The script I am working with, (a perl shopping cart)
      >
      >prints a: print "Content-type: text/html\n\n"; statement a
      >little way into
      >the script,
      >(The script doesn't work properly without it.)
      >
      >Then further down the script I try to set a cookie.
      >
      >The cookie code doesn't need reproducing here, except to say
      >that this is
      >how I set it.
      >
      >like so:
      >
      >print "Set-Cookie: $cookie\n";
      >print "Content-type: text/html\n\n";
      >
      >I can't take away the previous text/html and the cookie
      >setting one won't
      >work without it.
      >if I remove the later one, it prints the cookie contents to screen.
      >
      >But with the two in there, one of them gets printed to the
      >browser like so:
      >Content-type: text/html
      >In the top corner...(and the cookie doesn't get set.)
      >
      >So my question is this,, how can I reset the header so that
      >the cookie gets
      >set and
      >all is well... does that make sense???
      >
      >
      >kindest regards
      >
      >Frank
      >
      >
      >
      >
      >Your use of Yahoo! Groups is subject to
      >http://docs.yahoo.com/info/terms/
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.