Hi mRAza,

No I did not. This is not required as the superglobal $_GET is already url decoded. Decoding a second time may result in unexpected and unwanted problems.

Guarav, it doesnt work for me

---------- Post added at 06:03 PM ---------- Previous post was at 05:57 PM ----------

Okay, the code I wrote above actually DOES work. Something is wrong somewhere else, but I'm not sure where or why.

---------- Post added at 06:12 PM ---------- Previous post was at 06:03 PM ----------

Okay found the problem! But not the solution.

In fact the urlencoding DOES work, however, aparantly not in conjunction with apache's mod_rewrite.

Instead of somedomain.com/script.php?fileName=Q%26A.jpg (which works), I have been using somedomain.com/file/Q%26A.jpg (which doesnt work). Evidently, the mod_rewrite is breaking it.

Any ideas?