Jump to content

Recommended Posts

This is driving me crazy!!!!

 

I have this bit of PHP code that's breaking my CSS layout.

 

<?php
if ($user->data['is_registered']) { ?>
<div id="user_menu">
<a href="<?php echo $forum; ?>/ucp.php?mode=logout&sid=<?php echo  $user->data['session_id'] ?>">Logout</a><br>
<a href="<?php echo $forum; ?>/search.php?search_id=newposts">View new Posts</a><br>
<a href="<?php echo $forum; ?>/ucp.php?i=pm&folder=inbox">View new PM\'s</a><br>
<a href="<?php echo $forum; ?>/ucp.php">User CP</a><br>
<a href="<?php echo $forum; ?>/ucp.php?i=profile&mode=signature">Edit Signature</a><br>
<a href="<?php echo $forum; ?>/search.php?search_id=egosearch">My Posts</a><br />
</div>
<?php } else { ?>

<form method="post" action="<?php $root.$login_page ?>" name="Username" target="_self" >
<div id="login_title" >
Forum login
</div>
<div id="username_lable">
Username
</div>
<div id="usename_textbox">
<input class="forminput" value=" User Name" onfocus="this.value=''" id="username" name="username" size="16" /> 
</div>
<div id="password_lable">
Password
</div>
<div id="password_textbox">
<input class="forminput" value="password" type="password" onfocus="this.value=''" id="password" name="password" size="16"/> 
</div>
<div id="form_submit">
<input class="forminput" type="image" src="../../images/login_submit_btn.jpg" value="Log in" name="login" />
</div>
</form>
<a href="http://127.0.0.1/forum/ucp.php?mode=register"><img src="../../forum/styles/prosilver/theme/images/icon_register.gif" width="16" height="14" />Register</a>
</div>
<div id="forgot_pass_link">
<a id="login_box_open"  href="http://127.0.0.1/forum/ucp.php?mode=sendpassword">Forgot Your Password?</a>
</div>
<?php } ?>

 

I don't think it's the CSS because the else statement works fine with my css. It's the if statement that breaks it. It seems that the php if floating outside of the wrapper div, but I can't figure out how to correct this.

Link to comment
https://forums.phpfreaks.com/topic/219486-php-breaking-css-format/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.