Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

session variables in smarty

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
ogar
Smarty n00b


Joined: 01 Jun 2004
Posts: 3

PostPosted: Mon Jun 14, 2004 8:24 pm    Post subject: session variables in smarty Reply with quote

Dear Sir,
I have tears wellings up in my eyes Crying or Very sad from trying to get sessions to work in smarty. I have smarty runing and formsess. Both are working great Laughing , however, I can't get sessions to work properly Mad .
I've tried to understand by going all over the internet and trying to get an answer, and I thought I knew how to use them. Obviously not! Shocked
Could you explain it to me or give some examples.
I'm using "session start()" whenever I open a php file.
Please don't type the answer too fast as my brain is fried and I can't read too fast.
thx...
Back to top
View user's profile Send private message
Duncan
Smarty Pro


Joined: 16 Dec 2003
Posts: 166

PostPosted: Tue Jun 15, 2004 5:27 am    Post subject: Reply with quote

What kind of problem are you experiencing?
The session management lies out of smartys (default) functionality, so that the problem could be basically anything - the server, php settings, wrong session usage.

Best thing I can recommend for now is that you take a closer look at the session functions provided by php: http://ca.php.net/manual/en/ref.session.php
Back to top
View user's profile Send private message
katana
Smarty Rookie


Joined: 17 Apr 2003
Posts: 26
Location: France

PostPosted: Fri Jun 25, 2004 11:50 am    Post subject: Reply with quote

You should not have to do anything particular to get sessions running.

Just use session_start() before using any session var, and it should work. You just have to ensure that session.save_path is correct (phpinfo()) will give you its value, and ensure that the session ID is corectly transmitted between pages (either using cookies, or using a GET / POST variable).

As Duncan said, the sessions reference page on the PHP manual should give you any information you need.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP