Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

RE: [SMARTY] redirection
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

Report this thread to moderator Post Follow-up to this message
Old Post
Geoffrey Hoffman
12-02-04 09:08 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:11 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.