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 Problems

 
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 -> Add-ons
View previous topic :: View next topic  
Author Message
B00zy
Smarty Rookie


Joined: 19 Jul 2004
Posts: 12

PostPosted: Mon Jul 19, 2004 5:15 am    Post subject: Session Problems Reply with quote

I was trying...

Code:

{validate field="name" criteria="notEmpty"}


Now I have changed it to...

Code:

{validate field="name" criteria="isRegExp" expression="!^\w+$!" message="Name must be composed of only letters [A-Z], numbers [0-9], or the underscore character _"}


But looking at the $_SESSION variable, it is still using the last one. I am changing the validate criteria around a lot while developing, is there a sequence I could do this that would update the session upon every refresh of the page?
Back to top
View user's profile Send private message
B00zy
Smarty Rookie


Joined: 19 Jul 2004
Posts: 12

PostPosted: Mon Jul 19, 2004 7:19 pm    Post subject: Fixed Reply with quote

I added...

Code:

session_start();
if (!count($_POST)) {
   unset($_SESSION['SmartyValidate']);
}


Now refreshes the session when not submitting. Works fine while developing Wink
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Mon Jul 19, 2004 8:46 pm    Post subject: Reply with quote

SmartyValidate::disconnect() will accomplish the same thing as this unset FYI.
Back to top
View user's profile Send private message Visit poster's website
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 -> Add-ons 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