bazz
05-30-2008, 04:13 AM
I hope I can explain this OK.
In my site, I have a room bookings form on part of all pages. When I select dates and submit, script 2 loads a session and stores the data that it should.
Then I go to script three (to see more details about a room), and it also loads a session but, it has a new id. It stores what it should but it doesn't include the data from the first session.
However, if I go back to the previous page and refresh it, that script adopts the session id of the later script and merges data from the first session into the second.
Is this a known issue or have I created a new one? :)
here is the code from the start of script one
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use strict;
use DBI;
use Date::Manip;
use Date::Parse;
use Date::Format;
use Data::Dumper;
use CGI::Session;
use POSIX;
my $cgi = new CGI;
use lib '/var/www/vhosts/mydomain/subdomains/hotel/cgi-bin/';
require 'header_control.pm'; # locate headers and footers module
my $session = CGI::Session->load($cgi) or die CGI::Session->errstr;
#my $session_id = $session->param('_SESSION_ID');
and here's the start of the code from script 2
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use strict;
use DBI;
use Date::Manip;
use POSIX;
use Data::Dumper;
use CGI::Session;
my $cgi = new CGI;
use lib '/var/www/vhosts/mydomain/subdomains/hotel/cgi-bin/';
require 'header_control.pm'; # locate headers and footers module
my $session = CGI::Session->load($cgi) or die CGI::Session->errstr;
Can anyone suggest what is going on please and how I might fix it.
bazz
In my site, I have a room bookings form on part of all pages. When I select dates and submit, script 2 loads a session and stores the data that it should.
Then I go to script three (to see more details about a room), and it also loads a session but, it has a new id. It stores what it should but it doesn't include the data from the first session.
However, if I go back to the previous page and refresh it, that script adopts the session id of the later script and merges data from the first session into the second.
Is this a known issue or have I created a new one? :)
here is the code from the start of script one
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use strict;
use DBI;
use Date::Manip;
use Date::Parse;
use Date::Format;
use Data::Dumper;
use CGI::Session;
use POSIX;
my $cgi = new CGI;
use lib '/var/www/vhosts/mydomain/subdomains/hotel/cgi-bin/';
require 'header_control.pm'; # locate headers and footers module
my $session = CGI::Session->load($cgi) or die CGI::Session->errstr;
#my $session_id = $session->param('_SESSION_ID');
and here's the start of the code from script 2
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use strict;
use DBI;
use Date::Manip;
use POSIX;
use Data::Dumper;
use CGI::Session;
my $cgi = new CGI;
use lib '/var/www/vhosts/mydomain/subdomains/hotel/cgi-bin/';
require 'header_control.pm'; # locate headers and footers module
my $session = CGI::Session->load($cgi) or die CGI::Session->errstr;
Can anyone suggest what is going on please and how I might fix it.
bazz