For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > January 2006 > RE: [SMARTY] SmartyValidate 2.6 and Smarty 2.6.12 doesn't work ...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [SMARTY] SmartyValidate 2.6 and Smarty 2.6.12 doesn't work ...
Reynier Perez Mira

2006-01-23, 7:06 pm

Hi Monte:
Understand every, but I have one doubt: what's 'default'? a name for a =
form or a id or something ...

Best,
ReynierPM
4to. a=F1o Ing. Inform=E1tica
Usuario registrado de Linux: #310201
****************************************
*********************************=

El programador superh=E9roe aprende de compartir sus conocimientos.=20
Es el referente de sus compa=F1eros. Todo el mundo va a preguntarle=20
y =E9l, secretamente, lo fomenta porque es as=ED como adquiere su =
legendaria=20
sabidur=EDa: escuchando ayudando a los dem=E1s...

-----Mensaje original-----
De: Monte Ohrt [mailto:monte@ohrt.com]=20
Enviado el: Monday, January 23, 2006 10:51 am
Para: Reynier Perez Mira
CC: smarty-general@lists.php.net
Asunto: Re: [SMARTY] SmartyValidate 2.6 and Smarty 2.6.12 doesn't work =
....

Monte Ohrt wrote:

> Your code is almost right, just change:
>
> if(SmartyValidate::is_valid($_POST)) {
>
> to:
>
> if(!empty($_POST)) {
>
>


oops, make that:

if(empty($_POST)) {

I'll note that testing if $_POST is empty isn't always an accurate=20
approach in every situation, another approach is to test if the form is=20
registered:

if (!SmartyValidate::is_registered_form('de
fault')) {

>
>
>
>
> Reynier Perez Mira wrote:
>
class.[color=darkred]
no=20[color=darkred]
size=3D"35"=20[color=darkred]
contrase=F1a no=20[color=darkred]
http://localhost/admincp/index.php[color=darkred]
[color=darkred]
[color=darkred]
****************************************
*********************************=
=20[color=darkred]
Es=20[color=darkred]
=E9l,=20[color=darkred]
>

Monte Ohrt

2006-01-23, 7:06 pm

that is the name of the form. if you didn't name it when you registered,
then 'default' is correct. You can also leave it empty:

is_registered_form()

Reynier Perez Mira wrote:

>Hi Monte:
>Understand every, but I have one doubt: what's 'default'? a name for a form or a id or something ...
>
>Best,
>ReynierPM
>4to. año Ing. Informática
>Usuario registrado de Linux: #310201
> ****************************************
*********************************
>El programador superhéroe aprende de compartir sus conocimientos.
>Es el referente de sus compañeros. Todo el mundo va a preguntarle
>y él, secretamente, lo fomenta porque es así como adquiere su legendaria
>sabiduría: escuchando ayudando a los demás...
>
>-----Mensaje original-----
>De: Monte Ohrt [mailto:monte@ohrt.com]
>Enviado el: Monday, January 23, 2006 10:51 am
>Para: Reynier Perez Mira
>CC: smarty-general@lists.php.net
>Asunto: Re: [SMARTY] SmartyValidate 2.6 and Smarty 2.6.12 doesn't work ...
>
>Monte Ohrt wrote:
>
>
>
>
>oops, make that:
>
> if(empty($_POST)) {
>
>I'll note that testing if $_POST is empty isn't always an accurate
>approach in every situation, another approach is to test if the form is
>registered:
>
>if (!SmartyValidate::is_registered_form('de
fault')) {
>
>
>
>
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com