I assume you are wanting to do this for security reasons, or to identify a stolen camera.
What you tried would not be a permanent solution because anyone with some knowledge of digital cameras can delete photo files in internal memory.
What you did sounds right, it should have worked.
I wonder if your internal memory may have been full and you could not add any more pictures.
You should be able to clear the internal memory by removing the memory card and do a format of the camera internal memory.
Then try your experiment again.
For Panasonic DMC-FZ48
I read someone had done this and wondered how to as it seems a good idea.
I took the memory card out of my new DMC_FZ48, took a picture of A4 paper with my name and address.
But with the memory card reinserted that picture does not show. Perhaps internal memory has some special use ?
Any ideas ?

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic