Michael Heyder wrote :
So i fetched some code of the editpage.php and tried to use this.
just out of curious : why don't you simply use the existing EditPage class instead of copying some part of it ? (I used to believe that re-use was one of the main point of using classes)
something probably close to :
$editor = new EditPage( $article ); $editor->submit();