JQuery Mobile and PHP

JQuery Mobile and PHP

Hello, I am using JQuery Mobile to create a web app, and I am also using PHP with it. Most of the PHP works, except for the PHP in the footers and buttons. What it is doing is making 6 buttons instead of 4, and there is little bits of PHP text everywhere in the page. Does anyone know how I can fix this? Here is some of the code:

  1. <div data-role="footer" data-position="fixed" data-fullscreen="false">
  2. <div data-role="navbar">
  3. <ul>
  4. <li><a href="#" data-icon="back" data-rel="back">Back</a></li>
  5. <!--<li><a href="#" data-icon="forward" data-rel="forward">Forward</a></li>-->
  6. <li><a href="#" data-icon="home">Home</a></li>
  7. <?php
  8. if(isset($_COOKIE['username']) and 1==0){
  9. echo "<li><a href='#' data-icon='grid'>My Panel</a></li><li><a href='#' data-icon='minus'>Logout</a></li>";
  10. }else{
  11. echo "<li><a href='#' data-icon='check'>Login</a></li><li><a href='#' data-icon='plus'>Register</a></li>";
  12. }
  13. ?>
  14. </ul>
  15. </div><!-- /navbar -->
  16. </div><!-- /footer -->