Problem sa logiranjem

Radim na nekom UCPu i kod admin panela kad unesem lozinku prebaci me na drugi PHP fajl koji ne postoji

if(!IsUserAdmin(ReturnUsername(), 1)) header('location: index.php');
            ?>
               <div align="center" id="login_admin_main">
                <p id="login_admin_error_report">
                <form action="post" method="post">
                       <input type="password" name="login_admin_password" id="login_admin_password" placeholder="Lozinka" /><br /><br />
                    <input type="button" value="Prijava" onclick="SubmitForm(
                        'POST',
                        'submit_form.php?login_admin',
                        &quot;login_admin_password=&quot; + $(&#39;#login_admin_password&#39;).val(),
                        function(response)
                        {
                            $(&#39;#login_admin_error_report&#39;).html(response)&#59;
                            if(response == &#39;1&#39;)
                            {
                                $(&#39;#login_admin_main&#39;).hide().remove()&#59;
                                $(&#39;#admin_content&#39;).slideDown(1000)&#59;
                            }
                            else if(response == &#39;2&#39;)
                            {
                                $(&#39;#login_admin_error_report&#39;).css({
                                    &#39;background&#39;&#58;&#39;#f2bcbd&#39;,
                                    &#39;border&#39;&#58;&#39;1px solid #f00&#39;,
                                    &#39;padding&#39;&#58;&#39;5px&#39;,
                                    &#39;color&#39;&#58;&#39;white&#39;,
                                    &#39;text-align&#39;&#58;&#39;center&#39;
                                }).html(&#39;Lozinka nije to&#269;na!&#39;)&#59;
                            }
                        }
                    )" />
                </form>

submit_form.php

if(isset($_GET['login_admin']))
{
    if($_POST['login_admin_password'] == 'e5r9F1NQkYRMYY636GkM')
    {
        echo '2';
    }
    else echo '1';
}

Jel si siguran da radis provo $_GET pa posle $_POST?
To mi bas cudno.
Forma ti je POST a sto hvatas sa $_GET ne znam jedino ako imas neki razlog.

Stavi cijeli file ovako se ne vidi problem


Copyright © 2020 WM Forum - AboutContact - Sponsored by: Mydataknox & Profit Monkey