You are likely starting a new session every page load.

Try this for debugging, when the form pops up, print as part of the page (much better; STDERR if you got shell access) what the initial session id is, then in the next page (runmode that client submits to) print it out again, are they the same? I'm guessing 'no'.

Why not?

Last time i checked, CGI::Session does not take care of passing cookie by default. That is.. you create a session (a temporary storage likely in your server) but then.. how the heck do you know next time what session to fetch- if you have ten user clients? The user client has to tell the server what session- this is done in a variety of ways.You'll likely be using a cookie.

Read the manuals. Read them again, and again. You will be reading a lot. More than that. You will see how reading the manual for thirty minutes is worth it when your coding takes five minutes to write and works the second time off.

Ahahaha.. wait a second..
In your receiving end.. you call session->param('message') immediately? Why ? Shouldn't you call cgi->param('message') ? Why would it be in session unless you specifically stored it there?


In reply to Re^3: CGI::Session get the value of by leocharre
in thread CGI::Session get the value of by Anonymous Monk

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.