How about leaving it empty, what is wrong with that?
<form name="form1" id="mainForm" method="post" enctype="multipart/form-data" action=""></form>
Also, you can omit the action attribute and it will work as expected.
You can leave action blank or use this code:
<form name="form1" id="mainForm" method="post" enctype="multipart/form-data" action="<?php echo $_SERVER['REQUEST_URI'];?>"></form>
Leaving the action value blank will cause the form to post back to itself.