[PHP] Updating PHP checkout page
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
Re: [PHP] Updating PHP checkout page
On Friday 09 February 2007 21:29, Robert wrote: Greetings, This is about to your aproach to problem. For my point of view there are too many solution. 1-) Is that customer may have to register himself? If so you may get from his state date from here (when customer register himself you require his state data). This solution can be done in PHP. 2-) If that justomer may not have to register. This is mainly Javascript solution. A liddle js library may solve this. Of course you can post his data to server and calculate tax then post back again. 3-) And or you may generate ajax solution for this. When user selects his state, script auto post and get calculated tax. 4-) and of course BEST WAY is find a professional php programmer. Then tell what do you want. Ps: Also you may guessing STATE via IP number checking. (and this was not 100% safe way) Regards Sancar 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
Re: [PHP] updating php
blackwater dev wrote: I have installed php5 fine on my Fedora 3 box. I know need to recompile to add in a feature and did the same steps as the install ./configure, make, make install which went fine but when restart apache and go to the php.ini, my new configuration is not shown and Go to php.ini, or did you look at ?php phpinfo()? The compilation process won't change your php.ini for you -- It's too likely that you've already customized it, and you wouldn't want them to write over it. ?php phpinfo();? should show you what you typed for configure. If it's not the most recent thing you typed, then your make install didn't work, or you didn't really re-start Apache. the code throws errors because it isn't there. Is the process to upgrade different? Not a LOT different, but if you have compiled your new extension as a Module of PHP, then you may need to uncomment the line in PHP that enables that extension. If you compiled it as static (the default for almost all) then it should just work when you re-start Apache. Always check ?php phpinfo();? to see if you've got what you think you've got, and if the configure line matches what you typed. There are error logs in the PHP source directory (config.log) that will tell you more about what happened. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] updating php
Hello, I have installed php5 fine on my Fedora 3 box. I know need to recompile to add in a feature and did the same steps as the install ./configure, make, make install which went fine but when restart apache and go to the php.ini, my new configuration is not shown and the code throws errors because it isn't there. Is the process to upgrade different? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] updating php
blackwater dev wrote: Hello, I have installed php5 fine on my Fedora 3 box. I know need to recompile to add in a feature and did the same steps as the install ./configure, make, make install which went fine but when restart apache and go to the php.ini, my new configuration is not shown and the code throws errors because it isn't there. Is the process to upgrade different? Thanks! Are you using PHP as a module/dso? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php