I post data and redirect to another page with a userfunction and a simple form like the following example:
<?php
class user_test
{
public function getForm() {
$form = '
<form action="#" method="post">
<input type="text" name="test" value="test" />
<input type="submit" name="send" value="send" />
</form>
';
$postArray = t3lib_div::_POST();
if ( isset( $postArray['send'] ) ) {
header( 'Location: index.php?id=2' );
}
return $form;
}
}
this works fine if realURL is deactivated, but if I activate realURL this form leads me always to the homepage after submit :(.
The typoscript part looks as follows:
prefixLocalAnchors = all
simulateStaticDocuments = 0
baseURL = http://test.de
tx_realurl_enable = 1
realURL works for speaking URLs and other forms like powermail forms, but my own forms leads to homepage, hope you can help me :).
UPDATE
If I remove the hash from action attribute: 'action="#"' of this form it is working, is this solution passable?