♥Monika in Germany Posted October 5, 2005 Share Posted October 5, 2005 Hi, does anyone have a script ready to validate a form field (input field) so it it in the money format ready to be entered into the DB? I need to make sure no letters are used. I would like to make 2 separate fields with a dot in between and validate each so it only contains numbers, and of course the second one is < 100. I'd hate to make it and find a script later ;-). :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
Guest Posted October 11, 2005 Share Posted October 11, 2005 take a look in the php.net through the eregi and similar functions they post script examples. I've seen one http://www.php.net/manual/en/function.eregi.php but mentions use of the ctype.h in php and so depends on the available extensions. However there is a bunch of others for number formats/validation that may help Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted October 12, 2005 Author Share Posted October 12, 2005 take a look in the php.net through the eregi and similar functions they post script examples. I've seen one http://www.php.net/manual/en/function.eregi.php but mentions use of the ctype.h in php and so depends on the available extensions. However there is a bunch of others for number formats/validation that may help thx m8, that was a cool link. in the end I went with an easy but wonderful comparing of the value and the (int) of the value ... worked just as sweet as needed. :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.