No error checking etc yet but this now works
Sum phpdox