Hi Marian,
You use $photofile in the filter, but use $photofile_name and $photofilename in 
the copy.
Is there any other code inbetween?


----- Original Message ----- 
From: "Marian Briones" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, August 11, 2005 9:39 PM
Subject: [php-list] Uploading a file and stripping things from the file name


Me again with a variation on the earlier problem.

I need to strip illegal characters out of an uploaded photo now.  I am
trying this without results:

         $photofile=ereg_replace("[^[:alnum:]+$]", "", $_POST['photo']);



     copy($photo, "/home/user/public_html/memberfiles/$photofile_name");
//     copy($photo, "/home/user/public_html/memberfiles/$photofilename");


But, it isn't working.  I doesn't seem to want to change that
filename, copy the file to the new name.  Help!  I have people who are
uploading pix with spaces and it's screwing everything up....




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12h3ps1lc/M=362329.6886308.7839368.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1123837546/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/
 


Reply via email to