Forum Moderators: coopster & phranque

Message Too Old, No Replies

Cookies problem

         

Charles_cz

10:13 pm on Nov 8, 2003 (gmt 0)

10+ Year Member



I have cookie set - the problem is, that I can not read them correctly.

Here is code I use to print cookies:
Code

!/usr/local/bin/perl
$mail_prog = '/usr/sbin/sendmail' ;
use CGI;
$query = new CGI;
print "Content-type: text/html\n\n";


$answer = $query->cookie('answer');

($id, $status, $dobre, $spatne, $jmeno, $td, $celkem, $odpoved, $oprava, $nutnost) = split(/::/, $answer, 10);


print " $id, $status, $dobre, $spatne, $jmeno, $td, $celkem, $odpoved, $oprava, $nutnost";

exit;

Then I call script from web page:

Code

<!--#exec cgi="/cgi-bin/otazky/zobrazeni.pl" -->

Thing is that when I run script it self from browser
[example.com...] it reads cookies. If I run script from webpage using

[example.com...]
it does not read cookie values.

This problem is when I use Mozzila based browser. I tried the same thing with IE and it is working just fine.

Can somebody tell me how to read cookies or where the problem is?

Thank you

[edited by: heini at 11:21 pm (utc) on Nov. 8, 2003]
[edit reason] examplified urls / thanks! [/edit]

hakre

11:26 pm on Nov 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This problem is when I use Mozzila based browser

sorry to ask back, but because it works on another browser are you shure that in the failling one cookies are enabled?