[PHP] Check For Space

2003-04-02 Thread shaun
Hi, How can i make sure a value sent from a form has no spaces in it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Check For Space

2003-04-02 Thread Chris Hayes
At 17:16 2-4-03, you wrote: Hi, How can i make sure a value sent from a form has no spaces in it? Before sending: javascript that prevents this on sending or even while typing. Check the javascript form faqs on www.irt.org for this. After sending: Detect spaces with if (!(strpos(' ',

Re: [PHP] Check For Space

2003-04-02 Thread Marek Kilimajer
if(strpos($string, ' ') === false) { //space found } if you don't want any white character: if(ereg('\s',$string)) { //white character found } shaun wrote: Hi, How can i make sure a value sent from a form has no spaces in it? -- PHP General Mailing List