simple validation ???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

simple validation ???

Post by eshban »

Hello,

I need a script which allow the user to type just characters(a-z, A-Z, fullstop, underscore).
i want that script to must run in Mozilla as well as internet Explorer.

Mostly these type of scripts cannot run in Mozilla, so plz help

Eshban
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Client-side (i.e. Javascript)? (you'll also need to validate server-side as well)
Zythan
Forum Newbie
Posts: 16
Joined: Wed Apr 12, 2006 3:13 am

Post by Zythan »

Hello,

In Javascript try this

http://www.javascript-coder.com/html-fo ... tion.phtml

HTH

Zythan
User avatar
mabufo
Forum Commoner
Posts: 81
Joined: Thu Jul 10, 2003 11:11 pm
Location: Orland Park, IL
Contact:

Post by mabufo »

have a look at 'regular expressions' in php, and the eregi() funtion.
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Re: simple validation ???

Post by Oren »

eshban wrote:Mostly these type of scripts cannot run in Mozilla
Not if you are using PHP, do you have any problem with the script being written in PHP?
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: simple validation ???

Post by Roja »

eshban wrote:Hello,

I need a script which allow the user to type just characters(a-z, A-Z, fullstop, underscore).
i want that script to must run in Mozilla as well as internet Explorer.

Mostly these type of scripts cannot run in Mozilla, so plz help

Eshban
Javascript validation works just fine in Mozilla, in fact better than it does in IE usually.

You could also as an alternative validate in PHP.

What are you trying to accomplish, PHP validation, or Javascript?
Post Reply