I have just started using jQuery mobile and have spent time reading the docs. However, I am having a problem after a user logs in. After a successfull login, the user is taken to his/her page which there is a simple listview. If a user clicks on any item, then they are taken back to the login page. The page seems to be loading ok and I am sure that my markup is correct because in the chrome address bar, the address that i click shows as:
http://localhost/sample/app/test.php#ctlpnl,
which is the correct address for that link. Can someone show me my error. Thanks
LOGIN HTML
<div data-role="page" id="login" data-title="Test Login" data-theme="b">
<div data-role="header">
<h1>Sample Login</h1>
</div>
<div data-role="content">
<form method="post" id="login" rel="external" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>">
<div data-role="fieldcontain">
<label for="kt_login_user">Email *</label>
<input type="text" name="kt_login_user" id="kt_login_user" value="<?php echo KT_escapeAttribute($row_rscustom['kt_login_user']); ?>" size="66" placeholder="janedoe@example.com" />
<div id="userError">
<?php echo $tNGs->displayFieldHint("kt_login_user");?>
<?php echo $tNGs->displayFieldError("custom", "kt_login_user"); ?>
</div>
</div>
<div data-role="fieldcontain">
<label for="kt_login_password">Password *</label>
<label for="kt_login_rememberme"></label>
<input type="password" name="kt_login_password" id="kt_login_password" value="" size="46" placeholder="******" />
<div id="passError">
<?php echo $tNGs->displayFieldHint("kt_login_password");?>
<?php echo $tNGs->displayFieldError("custom", "kt_login_password"); ?>
<?php echo $tNGs->displayFieldError("custom", "kt_login_rememberme"); ?>
</div>
</div>
<div id="login_message"></div>
<div id="submitDiv" data-role="fieldcontain">
<input name="kt_login1" id="kt_login1" type="submit" value="Login" data-inline="true" />
</div>
</form>
</div>
<div data-role="footer"">
<h4>test 2009-2011</h4>
</div>
</div>
USERS INDEX.PHP
<div data-role="page" id="page">
<div data-role="header">
<h1>Users Page One</h1>
</div>
<div data-role="content">
<ul data-role="listview">
<li><a href="#requests">Requests</a></li>
<li><a href="#ctlpnl">Control Panel</a></li>
<li><a href="#userhelp">Help</a></li>
<li><a href="users/logout.php" rel="external">Logout</a></li>
</ul>
</div>
<div data-role="footer">
<h4>Users Start Page</h4>
</div>
</div>
<div data-role="page" id="ctlpnl" data-theme="b">
<div data-role="header">
<h1>Control Panel</h1>
</div>
<div data-role="content">
<?php echo $_SESSION['kt_name_usr']; ?> Control Panel
</div>
<div data-role="footer">
<h4>Control Panel Footer</h4>
</div>
</div>
You have probably forgotten to start session (BEFORE any output, add this code)