 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
theplayer777 Smarty n00b
Joined: 28 Apr 2012 Posts: 1
|
Posted: Sat Apr 28, 2012 1:36 pm Post subject: Problem with new object() |
|
|
Hi all,
I have a problem with smarty (i'm a beginner...) and i'm looking for a solution since hours...
I have a file called index.php with this code:
| Code: |
$fv = new FormValidator('post');
$smarty>assign('fv',$fv);
$smarty->display("template.tpl");
|
then I have this code in template.tpl:
| Code: |
{$fv = new FormStringCheck('name', 'Enter your name please');}
|
But this code throw me an error of Syntax... I really can't figure it out, and I can't create the new object FormStringCheck in index.php, because I'll create many occurences of template.tpl, with different values that will replace 'name' and 'Enter your name please'...
Thank you in advance for your help  |
|
| 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
|