Code2Design.com

User login

Programming

The Layout

Navigation

Popular content

Resources

Who's online

There are currently 0 users and 6 guests online.

Try adding "print"

Try adding "print" statements after every statement. This is one way to see where in the script you are making it to. Then, if you see the WRONG print statement print you will know where to look. For example:

<?php
//If they are already loged in
if(is_logged_in()){
   
///////////////////////
   
print 'You are logged in';
   
loggedIn();

//Else if they have submited the form to login 
} elseif(is_logging_in()){
   
///////////////////////
   
print 'You are logging in';
   
login($_POST['username'], $_POST['password']);

//Else this must be the first time they have come so show the login page
} else {
   
///////////////////////
   
print 'show the login form';
   
loginForm();
}
?>


Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <br> <br /> <h3>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use BBCode tags in the text, URLs will be automatically converted to links
More information about formatting options



Like what you see?

Why not add more? C2D is looking for other Christian Web Masters who would like to help write articles for this site. If you have expericance in FLASH, CSS/HTML, PHP/MySQL, PhotoShop/GIMP, Blender, Javascript, or just General Design - our users would love to hear what you have to say. Contact Us

delicious   digg   reddit   magnoliacom   newsvine   furl   google   yahoo   technorati