View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

$Session variable hell

Thread began 8/18/2009 10:53 pm by david.barrack304604 | Last modified 8/19/2009 1:23 pm by david.barrack304604 | 2935 views | 6 replies


Hi David,

Ok a couple of things now that I see the code after creating a database table with your fields and testing.

You have a "Do while" loop which is setting the variables through several variations so it's not going to be possible after the loop. Because, remember if you just echo the row variable, it will take just the first one... but since the loop has already set that same variable in many different iterations, it will simply make what your trying to do null.

Now, if you want to just get the first record, you could do that before the loop and store the result into a new variable or you could create a separate query for the single record below the loop.

Your session variable actually works fine but when you try to combine it with the aforementioned PRV_Event_ID, it too then becomes NULL because the PRV_Event_ID is no longer a valid result. If you were to just set the session and then echo the session variable, it shows exactly as it should.

But, if you do a separate query to set the PRV_Event_ID, it will work fine in combination with the Session variable you have. But, keep in mind, you'll only get the first record there as well unless you loop through the results. You could also set the PRV_Event_ID and get the calculation of the session with it inside the loop you already have... you would just need to make and extra table cell and put the code you have after your loop inside that cell instead.

One other housekeeping issue I noticed was on your "rates =", you left out the "echo" before the variable which is what was keeping you from seeing just the display of your session variable.

Hopefully that helps... let me know if I didn't explain something clearly.



Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...