RE: [SMARTY] redirection

From: Date: Thu, 02 Dec 2004 19:07:08 +0000
Subject: RE: [SMARTY] redirection
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12012@lists.php.net to get a copy of this message
In PHP: if( yourLoginTestHere ){ $smarty->assign("status", ""); }else{ $smarty->assign("status", "Your login failed."); } In login form tpl: {status} It can be tricky, because the 1st time they use the login page, they haven't tried to login yet - so your login test has to check to see if they actually tried to login or if this is the first view of the page. Also, there may be a cacheing issue, for the first time they see the form, status probably = "" then only if they see the page a 2nd time, it gets the status of "Your login failed.", so try not cacheing the page if it doesn't work right away. HTH- -----Original Message----- From: Erich Beyrent [mailto:erich.beyrent@beyrent.net] Sent: Thursday, December 02, 2004 11:29 AM To: smarty-general@lists.php.net Subject: [SMARTY] redirection I have a basic question about redirection, and assigning values. In a nutshell, I want my login procedure to redirect back to the login page if there was an error, but I also want to assign a message to the form. Obviously, the message assignment gets wiped out. How do I deal with? Best regards, Erich Beyrent Systems Administrator Information Technology Services Plymouth State University (603) 535-2948 ecbeyrent@plymouth.edu "Si vis pacem para bellum" -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.smarty.general (#12012) next »