|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Persistent shopping cart help
Hello,
I have a question about the persistent shopping cart tutorial. Is there a way to give the user a new session id? I hope you can help me with this. the code for the creation of the cartId = PHP Code:
i have already tried to destroy the cookie and set a new one using the function above, but it wont work. Thnx in advance |
|
#2
|
|||
|
|||
|
I dont know you indiviual situation but remember to get sessions to work the code 'session_start();' must be at the top of every page you want sessions to work on, before *anything* is output to the screen, having this half way down a function maynot be a good idea.
The code you have above does not do anything with sessions, except start one (it doesn't set any session variables or data, or read any) to set session data try: PHP Code:
for example to stop sessions use: session_destroy(); note setcookie() is to do with cookies not sessions, this may be covered by the tutorial but i dont know |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Persistent shopping cart help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|