Unfortunately my RPM install of apache 2.0.40 doesn't support the latest mod_perl.
It' not really an option right now.


----Original Message Follows----
From: Stas Bekman <[EMAIL PROTECTED]>
To: Tom Conway <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: Data lost when browser refreshed
Date: Mon, 15 Dec 2003 12:59:24 -0800

Tom Conway wrote:
My initial browser-refresh problem was variable scoping and I've worked that out.

I now have another odd problem.

I have a function that reads params and creates update statements.
Up to 18 lines of 5 elements each posted from a form.

The Code is like...

MyUpdate($dbc,$query)
....
     for ($cnt=0; $cnt<18; $cnt++) {

        $id = $query->param('id'.$cnt);
        $fname = '"'.$query->param('first_name'.$cnt).'"';
        $lname = '"'.$query->param('last_name'.$cnt).'"';

   $sql = qq{UPDATE table
                        SET first_name = $fname, last_name = $lname
                   WHERE id = $id};

After about 7 times thru, param() returns NULL for last_name, first_name but the ID has a value.
I use the same logic to retrieve data and it works fine.


The same code works without mod_perl enabled.

I'd suggest upgrading to CGI 3.01 and mod_perl 1.99_11. There were bugs with the incomplete read. You could have been hit by them. It has been resolved in the above versions.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

_________________________________________________________________
Shop online for kids’ toys by age group, price range, and toy category at MSN Shopping. No waiting for a clerk to help you! http://shopping.msn.com



-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to