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

Getting things in the right order.. (an effort to be brief)

Expand Messages
  • Franki
    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
    Message 1 of 8 , Oct 11, 2001
      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 message has been successfully submitted and would be delivered to recipients shortly.