Page 1 of 1

Problem with SESSION handling

Posted: Thu Jun 12, 2003 8:51 am
by rashed
hi,
i have a problem regarding $_SESSION collection.
I have registered a variable named "id" using session_register().
This id holds a database field named "vid".

When i choose an operation(add,view delete etc.) first time after login, thers no problem
But in second time, i face problem.
I have printed the value of session varable, second time it prints a garbage value like 45, 44. these values do not exist in database and because which effects the condition that i have applied in the query.

If anyone can help me please.
Thank You

Posted: Thu Jun 12, 2003 9:04 am
by volka
do not mix session_register and $_SESSION.
A simple $_SESSION['myVar'] = 'myValue'; will do.