input field validation

input field validation

am 11.05.2008 07:48:30 von arafat uddin

hi,
i want to input only integer in my field.if without integer any
input put in the field it will show warning messege.
such as "12 "will be accept
but "12sds" will not accept .
"fhe34" will not accept


plz help me by any javascript code.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: input field validation

am 11.05.2008 17:02:51 von Yves Sucaet

Allow me to point out that this is not database-related...

This website should get you everything you want:
http://www.acmesoffware.com/acme/ExamplesJS/jsExm_ValidateIn teger.asp

HTH,

Yves

----- Original Message -----
From: "arafat uddin"
To:
Sent: Sunday, May 11, 2008 12:48 AM
Subject: [PHP-DB] input field validation


> hi,
> i want to input only integer in my field.if without integer any
> input put in the field it will show warning messege.
> such as "12 "will be accept
> but "12sds" will not accept .
> "fhe34" will not accept
>
>
> plz help me by any javascript code.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: input field validation

am 11.05.2008 19:31:01 von sahabettin akca

------=_Part_562_18822676.1210527061330
Content-Type: text/plain; charset=ISO-8859-9
Content-Transfer-Encoding: base64
Content-Disposition: inline

aGksCgoqamF2YXNjcmlwdCBmdW5jdGlvbiA6CgpmdW5jdGlvbiBpc051bWJl cihvYmopIHsKCXZh
ciBsZW4gID0gb2JqLnZhbHVlLmxlbmd0aDsKCXZhciBsYXN0Q2hhciA9IG9i ai52YWx1ZS5jaGFy
QXQobGVuLTEpOwoJaWYoIGxhc3RDaGFyICE9ICcwJyAmJiBsYXN0Q2hhciAh PSAnMScgJiYgbGFz
dENoYXIgIT0gJzInICYmIGxhc3RDaGFyCiE9ICczJyAmJiBsYXN0Q2hhciAh PSAnNCcgJiYKCgoJ
bGFzdENoYXIgIT0gJzUnICYmIGxhc3RDaGFyICE9ICc2JyAmJiBsYXN0Q2hh ciAhPSAnNycgJiYg
bGFzdENoYXIgIT0KJzgnICYmI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N1Yi5waHAKPiA+ Cj4gPgo+ID4KPgo+
IC0tCj4gUEhQIERhdGFiYXNlIE1haWxpbmcgTGlzdCAoaHR0cDovL3d3dy5w aHAubmV0LykKPiBU
byB1bnN1YnNjcmliZSwgdmlzaXQ6IGh0dHA6Ly93d3cucGhwLm5ldC91bnN1 Yi5waHAKPgo+CgoK
LS0gCv5haGFiZXR0aW4gYWtjYSAvLyBzYWhvCg==
------=_Part_562_18822676.1210527061330--

RES: input field validation

am 12.05.2008 18:14:56 von Thiago Pojda

It'd be simpler to use isNaN()



Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
thiago.pojda@softpartech.com.br
Excel=EAncia em Softwares Financeiros


-----Mensagem original-----
De: sahabettin akca [mailto:adminsaho@gmail.com]=20
Enviada em: domingo, 11 de maio de 2008 14:31
Para: php-db@lists.php.net
Assunto: Re: [PHP-DB] input field validation

hi,

*javascript function :

function isNumber(obj) {
var len =3D obj.value.length;
var lastChar =3D obj.value.charAt(len-1);
if( lastChar !=3D '0' && lastChar !=3D '1' && lastChar !=3D '2' &&
lastChar
!=3D '3' && lastChar !=3D '4' &&


lastChar !=3D '5' && lastChar !=3D '6' && lastChar !=3D '7' && lastChar =
!=3D
'8' && lastChar !=3D '9' ) {
obj.value =3D obj.value.substring(0, len-1);

}

}

this is function use :


do not alert , but add alert
----
* obj.value =3D obj.value.substring(0, len-1);
---
this line before

---
alert('this field only integer!');
*

----

add.
good luck
?ahabettin akca (saho)
2008/5/11 arafat uddin :
-------------------------
and
this database field data type select int (integer) ,
tinyint, int, bigint... or
if(gettype($_POST['field'])!=3D"integer") // or =
if(intval($_POST['field'])==0)
or if(!intval($_POST['field']))
{
print"not integer";
location("header: xxxx.php");
#or
print"";
}
else
{
.....
}
2008/5/11 Yves Sucaet :

> Allow me to point out that this is not database-related...
>
> This website should get you everything you want:
> http://www.acmesoffware.com/acme/ExamplesJS/jsExm_ValidateIn teger.asp
>
> HTH,
>
> Yves
>
> ----- Original Message ----- From: "arafat uddin" =

> To:
> Sent: Sunday, May 11, 2008 12:48 AM
> Subject: [PHP-DB] input field validation
>
>
>
> hi,
> > i want to input only integer in my field.if without integer any
> > input put in the field it will show warning messege.
> > such as "12 "will be accept
> > but "12sds" will not accept .
> > "fhe34" will not accept
> >
> >
> > plz help me by any javascript code.
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--=20
?ahabettin akca // saho



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: RES: input field validation

am 12.05.2008 18:47:38 von Yves Sucaet

Nope, it's not. The problem was formulated as "Integer" detection. not
numerical detection in general. isNaN will return positive for e.g. float=
ing
point values as well. The solutions described in this thread all result i=
n
integer-only values.

All solutions presented are still off-topic, of course...

Yves

------ Original Message ------
Received: Mon, 12 May 2008 11:12:02 AM CDT
From: "Thiago Pojda"
To: "'sahabettin akca'" ,
Subject: RES: [PHP-DB] input field validation

It'd be simpler to use isNaN()



Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
thiago.pojda@softpartech.com.br
Excel=EAncia em Softwares Financeiros


-----Mensagem original-----
De: sahabettin akca [mailto:adminsaho@gmail.com] =

Enviada em: domingo, 11 de maio de 2008 14:31
Para: php-db@lists.php.net
Assunto: Re: [PHP-DB] input field validation

hi,

*javascript function :

function isNumber(obj) {
var len =3D obj.value.length;
var lastChar =3D obj.value.charAt(len-1);
if( lastChar !=3D '0' && lastChar !=3D '1' && lastChar !=3D '2' &&
lastChar
!=3D '3' && lastChar !=3D '4' &&


lastChar !=3D '5' && lastChar !=3D '6' && lastChar !=3D '7' && lastChar =
!=3D
'8' && lastChar !=3D '9' ) {
obj.value =3D obj.value.substring(0, len-1);

}

}

this is function use :


do not alert , but add alert
----
* obj.value =3D obj.value.substring(0, len-1);
---
this line before

---
alert('this field only integer!');
*

----

add.
good luck
?ahabettin akca (saho)
2008/5/11 arafat uddin :
-------------------------
and
this database field data type select int (integer) ,
tinyint, int, bigint... or
if(gettype($_POST['field'])!=3D"integer") // or if(intval($_POST['field']=
)==0)
or if(!intval($_POST['field']))
{
print"not integer";
location("header: xxxx.php");
#or
print"";
}
else
{
..
}
2008/5/11 Yves Sucaet :

> Allow me to point out that this is not database-related...
>
> This website should get you everything you want:
> http://www.acmesoffware.com/acme/ExamplesJS/jsExm_ValidateIn teger.asp
>
> HTH,
>
> Yves
>
> ----- Original Message ----- From: "arafat uddin" >
> To:
> Sent: Sunday, May 11, 2008 12:48 AM
> Subject: [PHP-DB] input field validation
>
>
>
> hi,
> > i want to input only integer in my field.if without integer any
> > input put in the field it will show warning messege.
> > such as "12 "will be accept
> > but "12sds" will not accept .
> > "fhe34" will not accept
> >
> >
> > plz help me by any javascript code.
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- =

?ahabettin akca // saho



-- =

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: RES: input field validation

am 17.05.2008 01:44:11 von jonllmsed

------=_Part_11212_24097083.1210981451108
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
Content-Disposition: inline

T2suLi5zbywgSSdtIGEgY291cGxlIGRheXMgYmVoaW5kLi4uCgpbc29tZXdo YXQgT1QgdGlkYml0
XQohaXNOYU4obnVsbCkgd2lsbCBhbHNvIHJldHVybiB0cnVlIHNpbmNlIG51 bGwgaXMgcGFyc2Vk
IGFzIDAuCgpOb3csIGlmIHlvdSdyZSBnb2luZyB0byB1c2UgYSBTdHJpbmcg c2VhcmNoLCBtaWdo
dCBhcyB3Z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:40:19 von Ruprecht Helms

YVES SUCAET wrote:

> Nope, it's not. The problem was formulated as "Integer" detection. not
> numerical detection in general.

this must be able via preg_match
(http://de3.php.net/manual/en/function.preg-match.php)

using the regular expression /[1-9]/ possible [0] in addition.


Regards,
Ruprecht Helms
------------------------------------------------------------ -
Ruprecht Helms IT-Service & Softwaredevelopment
allow your worktools be individual

Web: http://www.rheyn.de

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php