Man, I swear I am going to figure out how these work one day, but for now, can anyone help me out. I need the following to work: <?php if ( $user_ID ) <ul> <li> <strong>You are logged in</strong> </li> </ul> else() <ul> <li> <form action="<?php bloginfo('url') ?>/wp-login.php" method="post"> <div> <label for="log">Username: <input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="22" /></label><br /> <label for="pwd">Password: <input type="password" name="pwd" id="pwd" size="22" /></label><br /> <input type="image" id="loginsubmit" src="images/login.jpg" alt="login" /> <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/> </div> </form> </li> </ul> ?> PHP:
Format: if (condition) { code } else { code } Code (markup): <?php if (condition) { ?> HTML <?php } else { ?> HTML } ?> Code (markup):
Yes. The { ?>" at top and "<?php } is very important. Dont worry, when I was new, I made that mistake too. Also, you could just safe from closing the php tags by using echo 'all your long text here i/'m doing fine'; Just remember to escape which is annoying.