I need help a conceptual mistake and can not find the solution.

I need help a conceptual mistake and can not find the solution.

This is when I use a form and post the data step, then when I go backwards in a document jquery mobile does not give me error be defined post variables passed by and I see using get, however if you step values get in the form works fine but as I can do to pass the post values​​.



a small example of my problem:


//form.html
    <div data-role='page'>
        <div data-role='content'>
            <form method='post' action='login.php' >
                <label for='user'>user:</label>
                <input type='text' name='user' id='user'>
                <label for='password'>password:</label>
                <input type='password' name='password' id='password'>
                <input type='submit' value='login in'>
            </form>
        </div>
    </div>

//login.php
<?php

if(isset($_POST['user']) && isset($_POST['password'])){
     header("location: index.php");
}else{echo 'Error';}
?>






















You see when you insert the data correctly redireciono to index.php but instead if I step back fails because the variables are defined post.

Someone can help me solve this problem?

Greetings.