Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Session Problems

 
Post new topic   Reply to topic    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: 7365
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:   
Post new topic   Reply to topic    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