<input type=file name=file>
<input type=text name=name>

$fl = $_FILES['file'];
$fname = unesc($fl['name']);

if (!empty($_POST['name']))
$othername = unesc($_POST['name']);

If the name is My Computer's Performance,
it returns: My Computer's Performance

but the problem is:

if the file is: My Computer's Performance
and name is blank, it returns: s Performance

Please someone help me with this.

EDIT: It was working with apache, but now that I moved to IIS7, it's not working.

    Without any idea what unesc() does, it is impossible to debug this.

      Sorry I forgot to mention. Here it is:

      function unesc($x)
      {
      	if (get_magic_quotes_gpc())
      		return stripslashes($x);
      	return $x;
      }
        Write a Reply...