M
Mbubi Mbubi
Hi
i have installed Ruby and Apache on Windows Machine.
I tried to work with session but i have a problem.
the script se1.rhtml work fine:
<%
require "cgi"
require "cgi/session"
begin
ERuby.noheader = true
cgi = CGI.new("html3")
sess = CGI::Session.new(cgi)
sess["CustID"] = 123
sess["Part"] = "ABC"
print cgi.header
rescue StandardError => str
puts "Error : #{str}"
end
%>
<HTML>
End Script se1.rhtml
<A HREF=se2.rhtml>Link Test</A>
</HTML>
But when click on link i don't visualize the session variables
the sess["CustID"] is nil
se2.rhtml:
<%
require "cgi"
require "cgi/session"
begin
ERuby.noheader = true
cgi = CGI.new("html3")
sess = CGI::Session.new(cgi,"new_session" => false)
a=sess["CustID"]
print cgi.header
puts a
rescue StandardError => str
puts "Error : #{str}"
end
%>
<HTML>
End Script se2.rhtml
</HTML>
Where is the problem ????
thank's
i have installed Ruby and Apache on Windows Machine.
I tried to work with session but i have a problem.
the script se1.rhtml work fine:
<%
require "cgi"
require "cgi/session"
begin
ERuby.noheader = true
cgi = CGI.new("html3")
sess = CGI::Session.new(cgi)
sess["CustID"] = 123
sess["Part"] = "ABC"
print cgi.header
rescue StandardError => str
puts "Error : #{str}"
end
%>
<HTML>
End Script se1.rhtml
<A HREF=se2.rhtml>Link Test</A>
</HTML>
But when click on link i don't visualize the session variables
the sess["CustID"] is nil
se2.rhtml:
<%
require "cgi"
require "cgi/session"
begin
ERuby.noheader = true
cgi = CGI.new("html3")
sess = CGI::Session.new(cgi,"new_session" => false)
a=sess["CustID"]
print cgi.header
puts a
rescue StandardError => str
puts "Error : #{str}"
end
%>
<HTML>
End Script se2.rhtml
</HTML>
Where is the problem ????
thank's