[PHP] add to basket

2002-07-08 Thread Wilbert Enserink
Hi all, What's the best way to implement functions like 'add to basket' or 'add to wishlist' and so on. I mean: you are on a page with detail information about a product. If the user clicks the link for 'add to basket' I have to perform a piece of script and then go back to the detail page

Re: [PHP] add to basket

2002-07-08 Thread Justin French
I wouldn't rely on HTTP_REFERER at all.. some user agents don't set it. For things that need to revert back to a certain URL after a few tasks have been performed (eg login, email page to a friend, add to cart, add to wishlist, etc etc). To do this, I use PHP_SELF ($_SERVER['PHP_SELF'] in PHP =

Re: [PHP] add to basket

2002-07-08 Thread Analysis Solutions
I'd put a conditional include on the top of the present script. if ( !empty($_POST['addtocart']) ) { include('./the.update.script.php'); } Then redisplay the existing page with the new information. --Dan -- PHP classes that make web design easier SQL