Heya,
So I need to build a VERY simple "add to cart" function but I don't know where to begin. What I have is a site that has four pop up JS windows with just a few products. What I want to do is have a check box next to each product within each window and then a "add to cart" button at the bottom of the page. I need that button to send the titles of the checked boxes (ie shirt, cd, book, etc...) to another page on the site where they can view their order, after that, I know what to do. Can anyone help?! Thanks!
-Spence
"Add to cart" function, need help...
Moderator: General Moderators
-
WithHisStripes
- Forum Contributor
- Posts: 131
- Joined: Tue Sep 13, 2005 7:48 pm
-
WithHisStripes
- Forum Contributor
- Posts: 131
- Joined: Tue Sep 13, 2005 7:48 pm
Thanks guys for the input, I understand that pop ups aren't the best way to do it, but I'd like to give it a try if it's possible. Now, about using sessions, I understand php code pretty easily but I don't write it well, so really, I don't know where to begin in writing the code, could you give me an example code or maybe point me to some resources? Thanks SO much guys!
-Spence
-Spence
Simple sessions test:
Code: Select all
page1.php
<?php
session_start();
$_SESSION['MY_COUNTER']++;
echo 'Counter: ' . $_SESSION['MY_COUNTER'];
?>
<a href="page2.php">Page 2</a>Code: Select all
page2.php
<?php
session_start();
$_SESSION['MY_COUNTER']++;
echo 'Counter: ' . $_SESSION['MY_COUNTER'];
?>
<a href="page1.php">Page 1</a>-
WithHisStripes
- Forum Contributor
- Posts: 131
- Joined: Tue Sep 13, 2005 7:48 pm