I have a function where users can upload their photos to a photo area. I can't seem to find a good way to strip unwanted characters out of the filename. I also need this to work when they are choosing a username for their webspace.
It is coming in off a form submission. I don't want any spaces, and alpha numeric characters only. For the filename of the photo, I know I can just copy that up to the server with an identifier, but for the incoming username on the form, I already had someone thinking they were smooth by putting in a URL like www.theircompany.com for their desired webspace name. No no no. I want to make sure the .'s are stripped out of there and if they have spaces or characters like #!$@ etc. WHat is the syntax to do this? And what function? ereg_replace? I hope I am clearer than I have been in the past at explaining what it is I want to do. Thank you... Marian ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hs1abs8/M=362329.6886308.7839368.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1123433112/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992 ">Fair play? Video games influencing politics. Click and talk back!</a>.</font> --------------------------------------------------------------------~-> Community email addresses: Post message: [email protected] 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/
