This topic is locked

How do i save readonly values updating database

7/28/2009 3:11:34 AM
PHPRunner General questions
R
roadyx author

Hi There,
I have field which is readonly in the list page. It has a custom value as:
$dd= $data["amount_paid_yen"] * $_SESSION["forex_in_yen"];

$value=number_format($dd,2,'.','')
How do i save this to this to the database when I'm doing an edit/update
I presume Edit Page-> Before record updated. Like:
$values["amount_in_USD"]=$readonlyfields["amount_in_USD"];
which doesn't work at all
Thanks !

J
Jane 7/28/2009

Hi,
here is a sample:

$dd= $oldvalues["amount_paid_yen"] * $_SESSION["forex_in_yen"];

$values["amount_in_USD"]=number_format($dd,2,'.','');

V
vytb 7/28/2009

Do you mean phpr v.5.2 is out there?

R
roadyx author 7/29/2009

Hi,

here is a sample:


tried it but no workee.... :-(
Here's what I'm trying to do:


The amount_paid_php can be inline edited. THe exchange rate and amount_in_USD are readonly fileds.

I would the user to enter the amount, multiply by exchange rate and dynamically show the result to Amount_In_USD.

When the user does a save, i want the same value in Amount_IN_USD to save to the database.

J
Jane 7/29/2009

It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.