Reply to Removing non-numbers

Your name:

Reply:


Posted by Ben Miller on 10/04/43 11:08

OK - easy one here, I know. Having troubles removing anything that is not a
number from user input. According to manual, [!] is supposed to mean set of
non-matching optional characters. Tried

$var = ereg_replace("[!0-9]","",$var);

and it removes the numbers, but so does

$var = ereg_replace("[0-9]","",$var);

Any quick fix is greatly appreciated. Would be great to not have to list
every possible character a user might enter between the [ and the ].
Doesn't matter how may times and how big of letters I use to say "enter
numbers only", people still enter non-numbers.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация