I've created my own template which is basically a form. The data is meant to go back to the same page and do all the processing necessary.
However, for some reason when I put 'action="<?=$PHP_SELF;?>" it always go's back to the index.php and not to the actual page.
I've tried hard-coding the actual page URL (ie: /?page_id=6) into the form, but it always go's to index.php
I tracked down the page it's going to, it's calling "single.php" in the theme directory, but I do not why.
So, in summary.
1. Created a new .php in the theme's directory (ie; contact page)
2. Associated a page created in WP to the new theme I created in point 1.
3. Make the page have a form which sends data back to itself using $PHP_SELF or $_SERVER['PHP_SELF'];
4. Doing this makes the data go to index.php
5. Making the page go to "?page_id=7" still makes it go to index.php
Why can't I send data back to the same page? How do I solve this?