|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
RWBradley Smarty n00b
Joined: 12 Jun 2003 Posts: 1 Location: Glendale, CA 91202
|
Posted: Thu Jun 12, 2003 12:31 am Post subject: New to Smarty |
|
|
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 |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Jun 25, 2003 5:56 am Post subject: |
|
|
$er > 0 ?? |
|
Back to top |
|
|
|
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
|