How to enter data into a tables field using PHP
-
Hello,
I’m working on a PHP file for my website where I need to add some functions to the invoice.php. I was successful with most edits but there is one thing not working:
I let the file calculate some values (f.e. TAX and amount without TAX). This is working fine.
I have added new fields to the table and want to store the calculated values in this fields. I can’t get it running. Please give me some hints.<?php $result_vat = ...... ; if ($result_vat !== '1') { $vat = rcp_currency_filter($rcp_payment->amount- $rcp_payment->amount / 1.21 ); } else { $vat = '0,00';}; $update_sql = "UPDATE $rcp_payment SET amount_vat = '".$vat."' WHERE ID = '".$payment_ID."'"; ?>
My problem is with the SQL function. I have also tried to use fixed values for $vat and $payment_ID, but the same.
No error message in WordPress but nothing entered into the field amount_vat.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to enter data into a tables field using PHP’ is closed to new replies.