Code Comments
Programming Forum and web based access to our favorite programming groups.It could be a number of things, starting from different php version, different extensions availible, different php configuration, etc... Check that On 4/23/05, Reynier Perez Mira <rperezm@estudiantes.uci.cu> wrote: > > Well list: > > Few ws ago I begin use SmartyValidate and all it's ok. But I move my > site to another server and I have some problems now. This is my code PHP: > > if(empty($_POST)) { > SmartyValidate::connect($template, true); > SmartyValidate::register_validator('user name','uname','notEmpty',false); > SmartyValidate::register_validator('user email','umail','notEmpty',false); > SmartyValidate::register_validator('user email','umail','isEmail',false); > > SmartyValidate::register_validator('ucom ments','ucomments','notEmpty',fals e); > $template->display("guestbook_sign.tpl"); > }else{ > SmartyValidate::connect($template); > if(SmartyValidate::is_valid($_POST)) { > SmartyValidate::disconnect(); > $template->display('guestbook_show.tpl'); > }else{ > $template->assign($_POST); > $template->display("guestbook_sign.tpl"); > } > > after I included all need library and initialize all vars. Something like > this: > > require("./class/smarty/Smarty.class.php"); > require('./class/smarty/SmartyPaginate.class.php'); > require('class/smarty/SmartyValidate.class.php'); > > $template = new Smarty(); > > so this is part of my .tpl code in wich I try to validate some fields: > > .... > > <td> > {validate id="ucomments" message="Debes introducir algún comentarioantes > de firmar el Libro"} > <textarea name="ucomments" cols="55" rows="8" wrap="VIRTUAL" > id="ucomments"></textarea> > </td> > > .... > > The error appear in broswer is: > > Notice: Undefined offset: 1 in > D:\WWW\jclub\class\smarty\SmartyValidate .class.php on line 417 (just at th e > top) > > Warning: Smarty error: validate: validator id 'ucomments' is not > registered. in D:\WWW\jclub\class\smarty\Smarty.class.php on line 1088 > (after textarea) > > What's wrong? I not understand why if I move the site to another host and > not touch anything of code and the order of folders is the same, how can > pass this. > > Regards > > Reynier Pérez Mira > > 3ero. Ing. Informática > > Entre más inteligente me siento, más me doy cuenta de lo ignorante que > soy. > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.