Updating PHP checkout page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hopefully I will manage to explain my problem and you will have a solution 
for it :).
I have a checkout page, coded in PHP (by some other coder, not available 
anymore). On the page I have one table containing shopping cart items and 
one submission form, to collect all information from the customer. When the 
page is loaded, the table is filled with data from the temporary data table 
through SQL query (collected on the previous page, shopping cart page), 
except for the field about the amount of the sales tax, which is not yet 
known because I don't know anything about the customer. So I have a shopping 
cart table and a blank form below that, ready to be filled with customer's 
information.

Now, my question is: How can I calculate and fill the sales tax field in the 
shopping cart table, if the customer chooses his state from the drop down 
list in the form? I must say here that the sales tax is only applicable for 
residents of just one state, Vermont, because the company is based in 
Vermont. For instance, if the customer chooses Vermont as his state, how 
this can be translated into sales tax amount, added into the field in the 
shopping cart table and recalculated the total amount? Should the page be 
reloaded, with changed value of some variable for the sales tax? Should the 
JavaScript be used?
All information entered in the form should be kept after the selection of 
the state and calculation is made (I assume that the page should be 
reloaded/refreshed), so the user shouldn't have to re-enter them again.
After this recalculation, the customer hits the "Make Purchase" button and 
the form is submitted and the receipt for the purchase is sent.



I'm not very familiar with PHP or JavaScript, so any help is greatly 
appreciated.




Thanks,
Robert

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux