Thanks, it seems to be working now, and writing the RewriteRule for me as well.
Yay!!! --- In php-list@yahoogroups.com, Brian Cummiskey <[EMAIL PROTECTED]> wrote: > Marian Briones wrote: > > > How can I make sure it strips spaces? > > > >><?php > >>if (isset($_POST['dirnamewanted'])) { > >> $dirname = strip_tags($_POST['dirnamewanted']); > >> $dirname = strtolower($dirname); > >> $dirname = preg_replace('/[^a-z0-9]/','',$dirname); > >> $dirname = substr($dirname,0,30); //30 max > > add into the above: > > $dirname = str_replace( " ", "", $dirname ); > $dirname = str_replace( chr(0xCA), "", $dirname ); > > > That should kill any spaces that are pased in. > replace "" in the middle of the replacement with "_" for example if you > want an underscore to replace the space ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hhon4p5/M=362335.6886445.7839731.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1123780381/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In low income neighborhoods, 84% do not own computers. At Network for Good, help bridge the Digital Divide!</a>.</font> --------------------------------------------------------------------~-> Community email addresses: Post message: php-list@yahoogroups.com Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/