Re: [PHP] Good books on sessions

2002-07-30 Thread Justin French
Well, the first thing I recommended was to use $_SESSION rather than session_register(), since it's the way of the future, and also the only method i've put any serious time into. With register globals off, you'll then be able to clearly tell the difference between the form variable ($_POST['proj

Re: [PHP] Good books on sessions

2002-07-30 Thread Petre
Hi Rasmus Thanks, I think I got it now. Seems my problem with understanding was with the actual setting of the variables. The logic dictated that the session variables should stay the same throughout the session unless "changed" via a form selection, so I simply added a session_register("sessi

Re: [PHP] Good books on sessions

2002-07-30 Thread Petre
Yes , I agree,But that is exactly where my problem comes in, when I link the person forward, it DOES NOT take the new value for the project_id, as it is a form element and it only becomes variable on the action page. This is where I'm unsure about how to "initialize" the variable. As mentioned

Re: [PHP] Good books on sessions

2002-07-30 Thread Justin French
*shakes head a bit* I'm not REALLY sure what the problem is here, but let's take a step back. A session ID is a unique, random number assigned to a user as they kick around your site. To maintain state (a session) across multiple pages, you pass the session id around. This can be done with the

Re: [PHP] Good books on sessions

2002-07-30 Thread Rasmus Lerdorf
Yup, get rid of both ini_set() calls and take out the $sid=... and stuff and it should simply work. On Tue, 30 Jul 2002, Petre wrote: > Thanks, will work through this immediately. > Just to be clear. > If I DO stick with your suggestion of letting PHP do the url mangling, > and taking your code

Re: [PHP] Good books on sessions

2002-07-30 Thread Petre
Thanks, will work through this immediately. Just to be clear. If I DO stick with your suggestion of letting PHP do the url mangling, and taking your code below, I can simply remove the ini_set('session.use_trans_sid',false); and from your code to make it work exactly as is? Thanks Rasmus

Re: [PHP] Good books on sessions

2002-07-30 Thread Rasmus Lerdorf
The trick is to not name your form vars the same as your session vars. Keep them separate so you have full control of what ends up where. Also, note that if you are not relying on trans_sid or cookies then don't use SID. Call session_id() explicitly to get the session id. So, a quick little moc

Re: [PHP] Good books on sessions

2002-07-30 Thread Petre
Yes, it is a forward link to the page, but as mentioned, that page contains a form with the selection options, and on that form's action page is where I don't see the values change, so the question should probably be something like "how do I change the value in the session_var with the newly s

Re: [PHP] Good books on sessions

2002-07-30 Thread Rasmus Lerdorf
Well, how exactly do you implement the back button? If it is a normal client-side back, then of course the previous value will be shown. If it is actually a forward-link to the previous page, then your logic on that target page is bogus. By the way, trans-sid is compiled in by default in PHP so

Re: [PHP] Good books on sessions

2002-07-30 Thread Petre
Well, I have asked a couple of questions on this list, but they havn't really helped alot. Maybe you can help? My situation background is as follow: I have always written my apps in the following way: register_globals=on, so I allowed PHP to "generate" my variables for me on the action page, a

Re: [PHP] Good books on sessions

2002-07-29 Thread Rasmus Lerdorf
What issues? Just ask. -Rasmus On Mon, 29 Jul 2002, Petre wrote: > What are good books/websites about sessions. > I'm looking for more advanced stuff, I have the Luke Welling/Laura > Tompson book, and have read the manual, but I still have issues that are > unresolved. > > Thanks > > > > -- >