jQTouch and PHP Login Form

noviukraines

New Member
I'm working on a web app for the iPhone using the jQTouch framework. I've found a similar example to how I want to setup my login page at:http://www.golen.net/blog/2010/05/29/jqtouch-ajax-php-login-form/And have downloaded the sample php files:http://www.golen.net/blog/wp-content/uploads/2010/05/jqtouch.zipIn video 3 that accompanies this blog it shows the login form does not appear unless you click the login link. However I've downloaded the files and uploaded them to 2 of my servers and the login form is always appearing, regardless of whether I've logged in or not. As far as I can tell the downloadable php files are the same as the content in the video but I can't prevent the login form from showing all the time.Anyone have any ideas. Here's the index.php page which includes the login form as well:\[code\]<?php\[/code\]$loggedIn = (isset($_COOKIE['loggedin']) && $_COOKIE['loggedin'] == 'true')?true:false;?> \[code\] <title>jQTouch &beta;</title> <style type="text/css" media="screen">@import "jqtouch/jqtouch.css";</style> <style type="text/css" media="screen">@import "themes/jqt/theme.css";</style> <script src="http://stackoverflow.com/questions/3572270/jqtouch/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script> <script src="http://stackoverflow.com/questions/3572270/jqtouch/jqtouch.js" type="application/x-javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf-8"> var jQT = new $.jQTouch({ icon: 'jqtouch.png', addGlossToIcon: false, startupScreen: 'jqt_startup.png', statusBar: 'black', preloadImages: [ 'themes/jqt/img/back_button.png', 'themes/jqt/img/back_button_clicked.png', 'themes/jqt/img/button_clicked.png', 'themes/jqt/img/grayButton.png', 'themes/jqt/img/whiteButton.png', 'themes/jqt/img/loading.gif' ] }); // Some sample Javascript functions: $(function(){ }); </script></head><body> <div id="jqt"> <div id="home"> <div class="toolbar"> <h1>Welcome</h1> <a class="back" href="http://stackoverflow.com/questions/3572270/#home">Home</a> </div> <?php if (!$loggedIn) {?> <ul class="rounded"> <li class="forward"><a href="http://stackoverflow.com/questions/3572270/#login">Log In</a></li> </ul> <?php } else { ?> <ul class="rounded"> <li class="forward"><a href="http://stackoverflow.com/questions/3572270/doLogoff.php" rel="external">Log off</a></li> </ul> <?php } ?> </div> <form id="login" action="doLogin.php" method="POST" class="form"> <div class="toolbar"> <h1>Login</h1> <a class="back" href="http://stackoverflow.com/questions/3572270/#">Back</a> </div> <ul class="rounded"> <li><input type="text" name="username" value="" placeholder="Username" /></li> <li><input type="password" name="password" value="" placeholder="Password" /></li> </ul> <a style="margin:0 10px;color:rgba(0,0,0,.9)" href="http://stackoverflow.com/questions/3572270/#" class="submit whiteButton">Submit</a> </form> </div></body>\[/code\]
 
Back
Top