on the create account page, change the forms action to use the PHP_Self variable.
edit the form tag:
<form action="" method="post" enctype="multipart/form-data" name="createaccount">
to:
<form action="<?php echo($_SERVER['PHP_SELF']); ?>" method="post" enctype="multipart/form-data" name="createaccount">