pouncer Posted November 8, 2006 Share Posted November 8, 2006 [code=php:0] <div align="left"> <p align="center"><span class="style45"><br> <span class="style46">Username:<br> </span></span> <input name="txt_Username" type="text" class="style15" id="txt_Username"> <br> <span class="style47">Password:</span><br> <input name="txt_Password" type="password" class="style15" id="txt_Password"> <br> <br> <input name="frmLogin_Submit" type="submit" class="style11" id="frmLogin_Submit" value="Login"> <br> <span class="style47"><a href="forgot_password.php" style="color:#ffffff">Forgot your password? </a></span></p> </div>[/code]basically i want to disable all of that div section, but unsure how?if ($log->IsLoggedIn() == true) {//disable that div section}else {//whatever..}anyway got any ideas? Quote Link to comment Share on other sites More sharing options...
wwfc_barmy_army Posted November 8, 2006 Share Posted November 8, 2006 Could you not just put the div code into the If statement something like:[code=php:0]if ($log->IsLoggedIn() == true) {}else { <div align="left"> <p align="center"><span class="style45"><br> <span class="style46">Username:<br> </span></span> <input name="txt_Username" type="text" class="style15" id="txt_Username"> <br> <span class="style47">Password:</span><br> <input name="txt_Password" type="password" class="style15" id="txt_Password"> <br> <br> <input name="frmLogin_Submit" type="submit" class="style11" id="frmLogin_Submit" value="Login"> <br> <span class="style47"><a href="forgot_password.php" style="color:#ffffff">Forgot your password? </a></span></p> </div>}[/code] Quote Link to comment Share on other sites More sharing options...
pouncer Posted November 8, 2006 Author Share Posted November 8, 2006 i dont think so because the div stuff is html code Quote Link to comment Share on other sites More sharing options...
wwfc_barmy_army Posted November 8, 2006 Share Posted November 8, 2006 Good Point, You could save it in a seperate file, and recall it using include instead of the html code. Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted November 9, 2006 Share Posted November 9, 2006 [code]<?phpif ($log->IsLoggedIn() == true) {}else { ?> <div align="left"> <p align="center"><span class="style45"><br> <span class="style46">Username:<br> </span></span> <input name="txt_Username" type="text" class="style15" id="txt_Username"> <br> <span class="style47">Password:</span><br> <input name="txt_Password" type="password" class="style15" id="txt_Password"> <br> <br> <input name="frmLogin_Submit" type="submit" class="style11" id="frmLogin_Submit" value="Login"> <br> <span class="style47"><a href="forgot_password.php" style="color:#ffffff">Forgot your password? </a></span></p> </div> <?}?>[/code]You can jump in and out of PHP mode. For the record, I don't particularly like this approach, but you can do it! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.