AJAX和GET []困境

I'm using PHP Templates on my page by creating GET VARS which lead to a include() file. I have a commenting system on a blog page which sends an AJAX GET request on submit. However when the user clicks submit all the variables go to the url and my php template script doesn't recognize it and for security just redirects back to the home page. How do I avoid this?

AJAX CODE:

<script>
        function postComment() {
            if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
                xmlhttp = new XMLHttpRequest();
            }


            else {// code for IE6, IE5

                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            xmlhttp.onreadystatechange = function () {
                if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                    document.getElementById("commentHint").innerHTML = xmlhttp.responseText;
                }
            }
            var comment = document.getElementById("commenter").value;
            var id = document.getElementById("postID").value;
            xmlhttp.open("GET", "commentpost.php?comment=" + comment + "&postID=" + id, true);
            xmlhttp.send();

        }
        setTimeout("postComment()", 1000);

    </script>
    <form>
        <div id="comment">
            <textarea name="comment" id="commenter" rows="4" cols="125" style="max-width: 950px; max-height: 140px;" placeholder="<?php echo $_SESSION["name"] ?>, Write Your Comment Here" class="form-control"></textarea><br>
            <div id="commentHint"></div>
            <input type="submit" onclick="postComment()" value="Submit Comment"  class="btn btn-success btn-sm ">
            <input type="hidden" value="<?php echo $post_id ?>" id="postID">

        </div>
    </form>

TEMPLATE CODE:

               $p = $_GET["page"];
                if (preg_match("</^[a-zA-Z ]*$/>", $p)) {
                    session_start();
                    session_destroy();
                    header("location: index.php?error=2");
                } else {

                    switch ($p) {
                        case "2";
                            include("about.php");
                            break;
                        case "3";
                            include("games.php"); //CREATE PAGES
                            break;
                        case "4";
                            include("blog.php"); <== THIS PAGE IS THE BLOG PAGE
                            break;
                        case "5";
                            include("info.php");
                            break;
                        case "6";
                            include("settings.php");
                            break;
                        case "7";
                            include("functiontest.php");
                            break;
                        case "8";
                            include("styletech.php");
                            break;
                        case "9";
                            include("userlist.php");
                            break;
                        case "10";
                            include("adminpanel.php");
                            break;
                        case "11";
                            include("StyleTuts/styletech.php");
                            break;
                        default:
                            include("home.php");
                            break;
                    }
                }