Background image is not over the whole page

images php coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
FollowTheTortoise
New php-forum User
New php-forum User
Posts: 82
Joined: Sun Dec 04, 2011 1:35 pm
Location: Southern California
Contact:

Re: Background image is not over the whole page

Post by FollowTheTortoise » Tue Dec 13, 2011 6:07 am

You had an unmatched div tag before your head, which is not where it should be...I removed it since you had a similar tag elsewhere.....here's some updated PHP...

Code: Select all

<?php session_start(); ?>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="Styles/GeneralStylesTina.css" />
        <?php
        $_SESSION['mode'] = "";
        ?>
    </head>
    <body>
        <div id="background" align="center"><img src="images/Tina/Sauna_Relax_15989324.jpg" class="bg"></div>
        <div id="maindiv1" align="center">
            <div id="transbox" class="transbox">
                <div id="maindiv3" align="left" style="padding: 50px 50px 50px 50 px">
                    <?php
## Make the connection with the database

                    require_once 'db_access.php';


## Get the POST parameters

                    $username = mysql_real_escape_string($_POST[username]);

                    $password = mysql_real_escape_string($_POST[password]);


## Check if username and password are not empty               

                    if ($username == "") {


                        $_SESSION['login'] = 0;

                        echo "<p>&nbsp;</p>";
                        echo "Gelieve uw gebruikersnaam in te vullen!";
                        echo "<p>&nbsp;</p>";
                        echo '<a href="logintina.html" class="fout"><span>Keer terug</span></a>';
                        echo "<p>&nbsp;</p>";

                        goto waypoint1;
                    } elseif ($password == "") {


                        $_SESSION['login'] = 0;

                        echo "<p>&nbsp;</p>";
                        echo "Gelieve uw wachtwoord in te vullen";
                        echo "<p>&nbsp;</p>";
                        echo '<a href="logintina.html" class="fout"><span>Keer terug</span></a>';
                        echo "<p>&nbsp;</p>";

                        goto waypoint1;
                    } else {
                        
                    }


## check if username is in the database

                    $query = "SELECT * FROM DB_Users WHERE FL_Username='$username';";
                    $res = mysql_query($query);

                    if (mysql_num_rows($res) > 0) {

                        goto waypoint2;
                    } else {


                        $_SESSION['login'] = 0;

                        echo "<p>&nbsp;</p>";
                        echo "De gebruikersnaam bestaat niet.";
                        echo "<p>&nbsp;</p>";
                        echo '<a href="logintina.html" class="fout"><span>Keer terug</span></a>';
                        echo "<p>&nbsp;</p>";

                        goto waypoint1;
                    }

                    waypoint2:

## check if the password corresponds with the username

                    $sql = "SELECT * FROM DB_Users WHERE FL_Username='$username' and FL_Password='$password'";
                    $result = mysql_query($sql);


                    $count = mysql_num_rows($result);


                    if ($count == 1) {
                        
                    } else {


                        $_SESSION['login'] = 0;

                        echo "<p>&nbsp;</p>";
                        echo "Het wachtwoord is niet correct";
                        echo "<p>&nbsp;</p>";
                        echo '<a href="logintina.html" class="fout"><span>Keer terug</span></a>';
                        echo "<p>&nbsp;</p>";
                    }


## maak 2 verschillende login's op basis van type login.
## Haal het User Type bij de Username

                    $detail = Type;
                    $sql = "SELECT FL_" . $detail . " FROM DB_Users WHERE FL_Username='$username'";
                    $result = mysql_query($sql);

                    $users_type = mysql_fetch_row($result);
                    $users_type = $users_type[0];

## Geef de link weer op basis van het UserType


                    if ($users_type == "klant") {

                        $_SESSION['login'] = '1';
                        $_SESSION['username'] = $username;

                        echo "<p>&nbsp;</p>";
                        echo "U bent ingelogd";
                        echo "<p>&nbsp;</p>";
                        echo '<a href="LoginOrderingSucces.php" class="fout"><span>Ga verder</span></a>';
                        echo "<p>&nbsp;</p>";
                    } else {

                        $_SESSION['login'] = '2';
                        $_SESSION['username'] = $username;

                        echo "<p>&nbsp;</p>";
                        echo "U bent ingelogd als verkoper";
                        echo "<p>&nbsp;</p>";
                        echo '<a href="LoginOrderingVerkoperSucces.php" class="fout"><span>Ga verder</span></a>';
                        echo "<p>&nbsp;</p>";
                    }
                    waypoint1:
                    ?>
                </div>
            </div>
        </div>
    </body>
</html>

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests