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

New to 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 -> General
View previous topic :: View next topic  
Author Message
RWBradley
Smarty n00b


Joined: 12 Jun 2003
Posts: 1
Location: Glendale, CA 91202

PostPosted: Thu Jun 12, 2003 12:31 am    Post subject: New to Smarty Reply with quote

I am new to using Smarty and having a problem. I have a PHP login program (index.php) that calls a second program (auth.php) to validate the username and password. If they are not validate auth.php recalls index.php passing it an error code. At that time if an error code is present I want to print an error message. This works without templates but I can't make it work with templates - here some code samples
index.php
if (session_is_registered("message") && er > 0) { // error exists
$page->assign('page_error', 1);
$page->assign('page_msg', $message);
session_unregister('message');
}
index.tpl
{if $page_error eq 1 }
<table border="0" cellpadding="2" cellspacing="0" align="center" width="700">
<tr>
<td align="center" class="error"><b>{$page_msg}</b></td>
</tr>
</table>
{/if}

Can anyone point out what I'm doing wrong?
_________________
Roy W Bradley
Back to top
View user's profile Send private message Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Jun 25, 2003 5:56 am    Post subject: Reply with quote

$er > 0 ??
Back to top
View user's profile Send private message
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 -> General 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