I set up the following script to insert the shopping cart number on user's PC so that the shopping cart can remember the items placed in the user's shopping cart.
($Second, $Minute, $Hour, $DayOfMonth, $Month, $Year, $WeekDay, $DayOf +Year, $IsDST) = gmtime(time + 10800); @Mth = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec'); @Day = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); $SetYear = 1900 + $Year; $SetDay = $Day[$WeekDay]; $SetMonth = $Mth[$Month]; $expdate = $SetDay.', '.sprintf('%02d', $DayOfMonth).'-'.$SetMonth.'-' +.$SetYear.' '.sprintf('%02d:%02d:%02d', $Hour, $Minute, $Second).' GM +T'; $file = "cart.html"; @BODY=(); open(FILE, "$file"); @BODY=<FILE>; close(FILE); $NOS=$#BODY; print "Content-type: text/html\n"; &SetCookieExpDate("$expdate"); &SetCookiePath('/'); &SetCookieDomain('.clickitpro.com'); &SetCookies("$sid-cart", "$cartnum"); print "\n"; for ($i=0;$i<=$NOS;$i++) { $_ = $BODY[$i]; print "$_"; }
I tested it on my Windows PC and I was able to add multiple items to my shopping cart even after leaving the shopping cart for more than an hour. However, my client complained that many of her shoppers could not add multiple items to the shopping cart when they are using windows PC. However, she claimed that the cookies worked properly with MAC. I am totally lost here! Can someone help me, please? What could have caused the problems? Thank you!

In reply to Why cookies do not work on some users' windows PC? by clickit

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.