quote:
Originally posted by KeyStorm
Sessions are perfect for this kind of thing:
I dunno about that... seems kinda overkill...
If you're just passing one variable to one other page, you should just use the JavaScript POST thing as shown above. Even if you used sessions, you'd still have to do the same thing to get the value from JavaScript to PHP.
Also, sessions expire (default time is like half an hour), and are designed to exist only during one visit to the site. If you want your users' data to still be available when they return tomorrow, you should use cookies. If for some reason you don't want the data stored in cookies, store it in a database with some kind of ID associated with it, then put the ID in a cookie.