Jump to content

Complicated Loops Causing Errors in Display


e1seix

Recommended Posts

Howdy,

 

Have the following for you all to look at:

 

http://malegroomingfordummies.co.uk/login.php

 

And the code:

 

<?
  if($session->logged_in){
?>
    <div id="mainForm">
      <form action="process.php" method="POST">

        <?php
          echo "<div id='formWelcome'>Welcome <b>$session->username</b>,<br /> you are now logged in.</div>";
          echo "<div> </div>";
          echo "<div id='formOptions'>";
            echo "<a href=\"userinfo.php?user=$session->username\">My Account</a><br />";
            echo "<a href=\"useredit.php\">Edit Account</a><br />";

              if($session->isAdmin()){
                echo "<a href=\"admin/admin.php\">Admin Center</a><br />";
              }

            echo "<a href=\"process.php\">Logout</a>";
          echo "</div>";
          echo "<div> </div>";
          echo "<div id='formWelcome'>Please take a look around and take advantage of the privileges available to our members, including discount codes for online shopping.</div>";
?>

      </form>

    <!-- MAIN FORM - END --!>
    </div>

<?php
  }
  else{
?>

    <div id="mainForm">
      <form action="process.php" method="POST">

<?
  if($form->num_errors > 0){
    echo "<div>".$form->num_errors." error(s) found</div>";
  }
?>

        <div id="formUsername">Username: </div>
<div id="boxUsername"><input type="text" name="user" maxlength="30" style="width:115px" value="<? echo $form->value("user"); ?>"></div>
<div><? echo $form->error("user"); ?></div>
<div id="formPassword">Password: </div>
<div id="boxPassword"><input type="password" name="pass" maxlength="30" style="width:115px" value="<? echo $form->value("pass"); ?>"></div>
<div><? echo $form->error("pass"); ?></div>
<div id="formCheckbox"><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>Remember Me</div>
<div id="buttonLogin">   <input type="hidden" name="sublogin" value="1"><input name="LOGIN" type="submit" value="LOGIN" /></div>
<div id="GAP"> </div>
<div id="forgotPassword"><a href="forgotpass.php">Forgot Password?</a></div>
        <div id="signUp">Not registered yet?<br /><a href="register.php">Sign-Up!</a></div>
      </form>

    <!-- MAIN FORM - END --!>
    </div>

<?
}
          // MAIN TOP - END
          echo '</div>';
        // MAIN WINDOW1
        echo '</div>';
        echo '<div id="subFile">Currently, Our Best Savings:-</div>';

 

This is just a section where the error lies. In Mozilla the last <div> "subFile" presents itself directly beneath the form whereas it doesn't in IE.

 

any ideas?

 

Do you need to see the css?

 

/************************************************
* comments_form					*
************************************************/

#adImage {
        text-align:center;
}

#adDesc {
        background-color:#ffffff;
        font-size:12px;
        font-family:arial;
        text-align:center;
}

#adMain {
        float:left;
width:250px;
        background-color:#ffffff;
}

#formBox {
        float:left;
        width:500px;
        background-color:#ffffff;
}

#boxCity {
width:145px;
        background-color:#ffffff;
        float:left;
}

#boxCode {
width:145px;
        background-color:#ffffff;
        float:left;
}

#boxComments {
width:250px;
        background-color:#ffffff;
        float:left;
}

#boxCountry {
width:145px;
        background-color:#ffffff;
        float:left;
}

#boxRating {
width:145px;
        background-color:#ffffff;
        float:left;
}

#boxName {
width:145px;
        background-color:#ffffff;
        float:left;
}

#boxSecurity {
width:150px;
        background-color:#ffffff;
        float:left;
}

#boxSubmit {
width:150px;
        background-color:#ffffff;
        float:left;
}

#formCity {
        float:left;
width:100px;
        background-color:#ffffff;
        font-size:12px;
        font-family:arial;
        font-weight:bold;
}

#formCode {
        float:left;
width:100px;
        background-color:#ffffff;
        font-size:12px;
        font-family:arial;
        font-weight:bold;
}

#formComments {
        float:left;
width:250px;
        background-color:#ffffff;
        font-size:12px;
        font-family:arial;
        font-weight:bold;
}

#formCountry {
        float:left;
width:100px;
        background-color:#ffffff;
        font-size:12px;
        font-family:arial;
        font-weight:bold;
}

#formName {
        float:left;
width:100px;
        background-color:#ffffff;
        font-size:12px;
        font-family:arial;
        font-weight:bold;
}

#formRating {
        float:left;
width:100px;
        background-color:#ffffff;
        font-size:12px;
        font-family:arial;
        font-weight:bold;
}

#formSecurity {
        float:left;
width:100px;
        background-color:#ffffff;
        font-size:12px;
        font-family:arial;
        font-weight:bold;
}

#formSubmit {
        float:left;
width:100px;
        background-color:#ffffff;
        font-size:12px;
        font-family:arial;
        font-weight:bold;
}

#mainForm {
        float:left;
width:245px;
        background-color:#ffffff;
        text-align:left;
}

/************************************************
* index						*
************************************************/

/************************************************
* login						*
************************************************/

#boxPassword {
width:120px;
        background-color:#ffffff;
        float:left;
        text-align:right;
}

#boxUsername {
width:120px;
        background-color:#ffffff;
        float:left;
        text-align:right;
}

#buttonLogin {
        float:left;
width:120px;
        background-color: #ffffff;
        font-size:10px;
        font-family:verdana;
        font-weight:bold;
}

#forgotPassword {
        float:left;
width:120px;
        background-color:#ffffff;
        font-size:10px;
        font-family:verdana;
        font-weight:bold;
        text-align:center;
}

#formCheckbox {
        float:left;
width:125px;
        background-color: #ffffff;
        font-size:10px;
        font-family:verdana;
        font-weight:bold;
        text-align:right;
}

#formOptions {
        float:left;
width:245px;
        background-color:#ffffff;
        font-size:12px;
        font-family:arial;
        font-weight:bold;
}

#formPassword {
        float:left;
width:125px;
        background-color:#ffffff;
        font-size:12px;
        font-family:arial;
        font-weight:bold;
        text-align:right;
}

#formUsername {
        float:left;
width:125px;
        background-color:#ffffff;
        font-size:12px;
        font-family:arial;
        font-weight:bold;
        text-align:right;
}

#formWelcome {
width:245px;
        background-color:#ffffff;
        font-size:12px;
        font-family:arial;
        font-weight:bold;
        text-align:center;
}

#loginPromo {
        background-color: #ffffff;
        font-size:10px;
        font-family:verdana;
        text-align:center;
}

#signUp {
        float:left;
width:120px;
        background-color: #ffffff;
        font-size:10px;
        font-family:verdana;
        font-weight:bold;
        text-align:center;
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.