please help on my codes ...this works good in firefox but in internet explorer it gets disarrange. also, if im gonna zoom in/out in both browsers it also got disarrange.thanks

index.php

<?php
session_start();
//Unset the variables stored in session
unset($_SESSION['SESS_ID']);
unset($_SESSION['SESS_LNAME']);
unset($_SESSION['SESS_FNAME']);
unset($_SESSION['SESS_MNAME']);
unset($_SESSION['SESS_SUFFIX']);

if (isset($_GET['page']))
{
    $pg = $_GET['page'];
}
else
{
    $pg=1;
}
?>

<style type="text/css">
  body {
    background-image:url(images/login.jpg);
    background-position:center center;
    background-repeat:no-repeat;
    margin-top: 260px;
    background-attachment:fixed;
}

</style>

<html>
<body>
<div>
     <?php
        if ($pg==1){
        include 'admin/login.php';
        }
     ?>
</div>
</body>
</html>

login.php

<?php
include 'config/connect.php';
?>
<style type="text/css">
<!--
.ed{
border-style:solid;
border-width:thin;
border-color:#0076a3;
font-weight: bold;
padding:8px;
margin-bottom: 4px;
}
#button{
text-align:center;
font-family:Arial, Helvetica, sans-serif;
font-size: large;
border-color:#0076a3;
padding:5px;
background-color:#0076a3;
height: 36px;
width:70px;
}
table{
    margin-top: 143px;
    margin-left: 600px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
}
-->
</style>
<html>
<body>
<form action="" method="post">
<table border="0" style="border-collapse: collapse" cellpadding="3" >
<tr>    
    <td><font color="white">I.D. Number</td><td><font color="white">Password</td><td></td>
</tr>
<tr>
    <td><input type="text" size="25" name="idNumber" class="ed"></td>
    <td><input type="password" size="25" name="password" class="ed"></td>
    <td><input type="submit"name="login"value="Login" id="button"> </td>
</tr>
</table>
</form>
</html>


<?php
if (isset($_POST['login'])){    


    $idNumber = $_POST['idNumber'];
    $password = md5(strtoupper($_POST['password']));       
    $result = mysql_query("SELECT * FROM users WHERE idNumber='$idNumber' AND password='$password'");
    $record = mysql_fetch_array($result);
        $accountType = $record['accountType'];    

        if ($accountType=='ADMINISTRATOR')
    {
        //Create query
        $qry="SELECT * FROM empInfos WHERE idNumber='$idNumber'";
        $results=mysql_query($qry);
                if(mysql_num_rows($results) > 0) {
                //Login Successful
                session_regenerate_id();
                $member = mysql_fetch_assoc($results);
                                $_SESSION['SESS_ID'] = $member['id'];
                                $_SESSION['SESS_IDNUMBER']=$member['idNumber'];
                                $_SESSION['SESS_LNAME']=$member['lName'];
                                $_SESSION['SESS_FNAME']=$member['fName'];
                                $_SESSION['SESS_MNAME']=$member['mName'];
                                $_SESSION['SESS_SUFFIX']=$member['suffix'];
                                $_SESSION['SESS_ACCOUNT']=$accountType;                                
                session_write_close();                               
                header("location: admin.php");
                exit();
            }

        }
        else if ($accountType=='TEACHER')
    {
        //Create query
        $qry="SELECT * FROM empInfos WHERE idNumber='$idNumber'";
        $results=mysql_query($qry);
                if(mysql_num_rows($results) > 0) {
                //Login Successful
                session_regenerate_id();
                $member = mysql_fetch_assoc($results);
                                $_SESSION['SESS_ID'] = $member['id'];
                                $_SESSION['SESS_IDNUMBER']=$member['idNumber'];
                                $_SESSION['SESS_LNAME']=$member['lName'];
                                $_SESSION['SESS_FNAME']=$member['fName'];
                                $_SESSION['SESS_MNAME']=$member['mName'];
                                $_SESSION['SESS_SUFFIX']=$member['suffix'];
                                $_SESSION['SESS_ACCOUNT']=$accountType;                                
                session_write_close();                               
                header("location: admin.php");
                exit();
            }

        }
        else if ($accountType=='CASHIER')
    {
        //Create query
        $qry="SELECT * FROM empInfos WHERE idNumber='$idNumber'";
        $results=mysql_query($qry);
                if(mysql_num_rows($results) > 0) {
                //Login Successful
                session_regenerate_id();
                $member = mysql_fetch_assoc($results);
                                $_SESSION['SESS_ID'] = $member['id'];
                                $_SESSION['SESS_IDNUMBER']=$member['idNumber'];
                                $_SESSION['SESS_LNAME']=$member['lName'];
                                $_SESSION['SESS_FNAME']=$member['fName'];
                                $_SESSION['SESS_MNAME']=$member['mName'];
                                $_SESSION['SESS_SUFFIX']=$member['suffix'];
                                $_SESSION['SESS_ACCOUNT']=$accountType;                                
                session_write_close();                               
                header("location: admin.php");
                exit();
            }

        }
}
?>
Member Avatar for diafol

This won't be due to php. It'll be a css issue. I noticed that you are also using inline sizing - do it all in a css file or head style tag. Need to move to html/css forum?

ok ill try it there thanks..ill just mark this as solved?

Member Avatar for diafol

No I'll move... OK, done :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.