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(' ', $string)===false) {ECHO "bloody idiot, i told you not to
do that. Stupid User!";}
In PHP you can remove spaces at start and end of the entry with trim(...).
Remove all spaces in a string with $string=str_replace(...) (replace " "
with "").
(see manual www.php.net/manual for proper use of these functions.)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php