0

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();
            }

        }
}
?>

Edited by diafol: wrong forum

2
Contributors
4
Replies
21
Views
4 Years
Discussion Span
Last Post by lloydsbackyard
0

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?

Edited by diafol

0

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

Edited by diafol

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.