ow-design Posted May 18, 2007 Share Posted May 18, 2007 Hello Everyone... I am back and with a new problem! Basically i have created a shopping cart in PHP but before that there is a page for the item and a selction of variables e.g. sizes and colours all with different prices, How would i go about having a total underneith that automatically calculates the total of the options the user selects? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/52018-adding-fields-with-php/ Share on other sites More sharing options...
pocobueno1388 Posted May 18, 2007 Share Posted May 18, 2007 You are going to have to store the options they select somewhere, either through a form with variables, or in a session. You will also need to somehow link the price for each possible option, which you would probably store in the database. Wait...I just read your question again and may have read it wrong the first time. Are you wanting to have the price update as the user selects options? You will need to look into JavaScript for that. Quote Link to comment https://forums.phpfreaks.com/topic/52018-adding-fields-with-php/#findComment-256376 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.