I'm currently working on a shopping cart system for a school project and one of group members pointed out an inconvenience.
When you add a product to your basket your redirected to a registration page to create an account (with your personal basket).
This is how the system should work. (I'd prefer cookie storage and when registered to a database, but hey, i'm not the teacher).
Anyway.. imagine you're browsing in a rather large store for a product, you finally got it and then you press "add to basket" and you need
to register, once registered you have to do the search process all over again. In a marketing way, this is not good.
So is there a way to store the "came from" link over a few pages?
1. So user is on a certain page [this is the url that needs to be stored]
2. User clicks on add product, is redirected to register.php
3. User registers (register function is in functions.php)
4. When registered he is redirected to the register_success.php page
5. And from here he should be able to be redirected to the url from step one.
Anyone?
[PHP] Storing a link
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
$_SESSION['someName'] = $url;