I registered here only to reply that your code worked for me at first try.
Thank you i can do lots of things especialy in php but this kind of thing like your code is too advanced for me right now. It saved me lot of time!.
People who say its not working: read what he said. Do do replace, do not add after, simply add before and make sure to go check in status bar the f=xx.
Thank you again