[Solved] jquery mobile & php


Here you go, fixed it:

PAGE 1: index.html

<!DOCTYPE html> 
<html> 
<head> 

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>    
<script src="https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.css">
<script type="text/javascript" src="http://dev.jtsage.com/cdn/spinbox/latest/jqm-spinbox.min.js"></script>

</head> 
<body>
        <div data-role="page">
            <h1 id="header">IT Cafe</h1>
            <a href="#hot" data-role="button" data-inline="true" data-icon="home" data-iconpos="notext" id="homeicon" ></a>
            <a href="#shop" data-role="button" data-inline="true" data-icon="shop" data-iconpos="notext" id="shopicon" ></a>
            <nav data-role="navbar">
                <ul>
                    <li><a href="#hot" class="ui-btn-active ui-state-persist" >Coffee(Hot)</a></li>
                    <li><a href="#ice" >Coffee(Ice)</a></li>
                    <li><a href="e#tc" >Etc</a></li>
                </ul>
            </nav>
            <form name="f" method="post" action="submit.php"> 
                <input type="text" name="test" /> 
                <input type="submit" value="submit" /> 
            </form> 
        </div>
</body>
</html>

PAGE 2: submit.php

<!DOCTYPE html>
<html>
<head>
    <title>jQuery MOBILE</title>
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0"/>
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script> 
</head>
<body>
    <div data-role="page" id="second">
        <div data-theme="a" data-role="header">
            <h3>Page 2</h3>
        </div>

        <div data-role="content">
            You Selected:  
            <?php 
                $var = $_POST['test'];
                if(isset($var)){echo $var;}     
            ?>
        </div>
    </div>
</body>
</html>

4

solved jquery mobile & php