I couldn't get the other code to give the user back an error to work  
either.

In one instance, where they are uploading a photo, there is no reason  
for the user to know that the name was changed (to protect the  
innocent).  But it is true, it would be better if I could give back an  
error if it sees that there is illegal stuff in the form submission.

I dont' know why it isn't working, but I am so frustrated I'm ready to  
chuck the file folder out the window and let the dusty cat eat it...


On Aug 8, 2005, at 10:33 AM, Mike Franks wrote:

>
> On 8/8/2005, "Marian Briones" <[EMAIL PROTECTED]> wrote:
>
>>
>>
>>
>> I think I'm looking for something like this:
>
> $dirnamewanted = ereg_replace("^[[:alnum:]]+$"
> $_POST['dirnamewanted']);
>
>
> Problem is that this crashes my script.  I am so tired of this thing...
>>
>>
>>
>
> Marian - as someone else already mentioned, it may not be a good idea  
> to
> automagically change a value provided by the user, unless there's no
> reason for the user to ever know the modified value....
>
> That said, if you really want to use ereg_replace, try this:
>
> ereg_replace("[^[:alnum:]+$]", "", $_POST['dirnamewanted']);
>
> (note: placed ^ and +$ inside bounding brakcets, added replace string,
> separated parms with commas)
>
> Mike
>
>
>
> 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
>
>
>
>
>
>
>



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