colinch Posted November 26, 2012 Share Posted November 26, 2012 Hello, I've made a simple shopping cart system where people can select items and it will appear in a small shopping cart which is in the corner of each page. Now I want when people go to the "checkout" page, there will be a list of products they have selected (as checkboxes being checked) (thats because it will be sent as a mail to me). My website is in dutch but it's not hard to understand the system. Here's my page: http://www.colinch.com/11eventswebsite The only pages working are -> (from the menu) diensten.php and when diensten.php is selected -> hapjes.php from the dropdown menu. Those two pages are currently working and can be added to the little cart. So, as you can see, there's a button on each page saying: "toevoegen aan offerte" which means add to cart. What I want is, when they have selected their things which are now in the cart, they should click on a button to send their choices to a page where they are automatically selected or printed. It doesnt have to be very complicated, so it doesnt really have to be checkboxes if thats hard (im just a beginner), the only thing I want is that: -people can see their choices printed on the "checkout" page -i can see those choices in the mail they send me (I thought checkboxes are easy because they appear in the mail) the checkout is actually them sending a mail to me with their information + the selected products from the cart. Hopefully there is a function for it and if any codes are required, I will post them. I hope there is someone that can help me. Sorry for my english by the way. Quote Link to comment https://forums.phpfreaks.com/topic/271195-php-selection-in-checkbox/ Share on other sites More sharing options...
Christian F. Posted November 26, 2012 Share Posted November 26, 2012 (edited) You have an error in your menu: You've written "diensten.html" instead of "diensten.php". Also, I'm not seeing any kind of cart on that site, and I'm not quite certain what you're asking for in any case. If you're looking for help on how to design a shopping cart system, then I recommend you read this post. It'll give you the basic outline, and the rest should be pretty much obvious. Lastly: If this is indeed a question on how to make such a solution, then this thread should have been posted in the "Application design" section. "PHP coding help" is for help with actual PHP code you've written, and need some help to debug. Edited November 26, 2012 by Christian F. Quote Link to comment https://forums.phpfreaks.com/topic/271195-php-selection-in-checkbox/#findComment-1395187 Share on other sites More sharing options...
colinch Posted November 26, 2012 Author Share Posted November 26, 2012 (edited) Ah sorry, you should go to diensten.php and/or http://www.colinch.c...site/hapjes.php On both pages, when you've clicked on the button, it will be added to the cart. The system is already there, but I don't know how to post/print/show the results (selected products) on a checkout page. Best would be to have checkboxes for each product on the checkout page, and when one is selected the box is "checked" on the checkout page Edited November 26, 2012 by colinch Quote Link to comment https://forums.phpfreaks.com/topic/271195-php-selection-in-checkbox/#findComment-1395196 Share on other sites More sharing options...
Beeeeney Posted November 26, 2012 Share Posted November 26, 2012 Ah sorry, you should go to diensten.php and/or http://www.colinch.c...site/hapjes.php On both pages, when you've clicked on the button, it will be added to the cart. The system is already there, but I don't know how to post/print/show the results (selected products) on a checkout page. Best would be to have checkboxes for each product on the checkout page, and when one is selected the box is "checked" on the checkout page You just save the information about the products they selected in a variable an array, then echo it back on the confirmation page. Quote Link to comment https://forums.phpfreaks.com/topic/271195-php-selection-in-checkbox/#findComment-1395200 Share on other sites More sharing options...
colinch Posted November 29, 2012 Author Share Posted November 29, 2012 i've figured out I can just echo checked="on" but how should I save information in the array? Quote Link to comment https://forums.phpfreaks.com/topic/271195-php-selection-in-checkbox/#findComment-1396156 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.