Posted by sunnyfliesBY accident is correct. On accident doesn't make sense. You wouldn't say "on mistake", would you?