Inlog pagina gezocht!

Gestart doorFreestyle8 reacties70 weergaven

9 berichten · pagina 1 van 1

Freestyle

Lid · Topicstarter

Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik wil dat iemand een inlog script maakt. in de pagina hier onder.
Functies:
Wachtwoord + code moeten goed zijn. Er word dan een sessie aangemaakt. Maar deze moet worden vergeten als je van de website af gaat.
Wat krijg je er voor als hij het doet??
1punt!

Info:
Gebruikers naam = Code
Mysql gegevens:
Tabel: secure

Sessie die moeten worden aangemaakt van uit de database
gebruikersnaam = code
wachtwoord = wachtwoord

Inlog pagina
Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]functies.php[/COLOR][COLOR= #007700];[/COLOR]
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="robots" content="nofollow" />
<title>Login voor gevoegden</title>
<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen" title="default" />
<!--  jquery core -->
<script src="js/jquery/jquery-1.4.1.min.js" type="text/javascript"></script>

<!-- Custom jquery scripts -->
<script src="js/jquery/custom_jquery.js" type="text/javascript"></script>

<!-- MUST BE THE LAST SCRIPT IN <HEAD></HEAD></HEAD> png fix -->
<script src="js/jquery/jquery.pngFix.pack.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$(document).pngFix( );
});
</script>
</head>
<body id="login-bg"> 
<!-- Start: login-holder -->
<div id="login-holder">

    <!-- start logo -->
    <div id="logo-login">
        <a href="index.php">Sitemaster database voor bevoegden!</a>
    </div>
    <!-- end logo -->
    
    <div class="clear"></div>

    <!--  start loginbox ................................................................................. -->
    <div id="loginbox">
    
    <!--  start login-inner -->
    <div id="login-inner">
    <form action="login.php" method="POST">
        <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <th>Code</th>
            <td><input type="text"  name="admin" class="login-inp" /></td>
        </tr>
        <tr>
            <th>Password</th>
            <td><input type="password" name="password" value=""  onfocus="this.value=" class="login-inp" /></td>
        </tr>
        <tr>
            <th></th>
            <td><input type="submit" name="verzend" class="submit-login"  /></td>
        </tr>
        </table>
    </form>
    </div>
     <!--  end login-inner -->
    <div class="clear"></div>
`
    <a href="forgot" class="forgot-pwd">Forgot Password?</a>
    
 </div>
 <!--  end loginbox -->
 [COLOR= #0000BB]<?php[/COLOR]
 [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]forgot[/COLOR][COLOR= #007700]]))
 {[/COLOR]
?>
    <!--  start forgotbox ................................................................................... -->
    <div id="forgotbox">
        <div id="forgotbox-text">Please send us your email and well reset your password.</div>
        <!--  start forgot-inner -->
        <div id="forgot-inner">
        <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <th>Email address:</th>
            <td><input type="text" value=""   class="login-inp" /></td>
        </tr>
        <tr>
            <th> </th>
            <td><input type="button" name="forgot" class="submit-login"  /></td>
        </tr>
        </table>
        </div>
        <!--  end forgot-inner -->
        <div class="clear"></div>
        <a href="" class="back-login">Back to login</a>
    </div>
    <!--  end forgotbox -->
[COLOR= #0000BB]<?php[/COLOR]
 [COLOR= #007700]}[/COLOR]
 ?>
</div>

</body>
</html>
0
Berichten
9.953
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wat is het probleem?
0
Berichten
28
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja dus.. wat is het probleem?
0
Freestyle

Lid · Topicstarter

Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Sebastiaanh schreef:
Wat is het probleem?
Lijkt me duidelijk. Hij werkt niet.

Extra info; vergeten te zeggen:
Ik krijg geen error of fout melding!

Ik heb ook or die(mysql_error());
bij de query staan!
0
Berichten
9.953
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aan "Lijkt me duidelijk. Hij werkt niet." kunnen wij niet weten WAT er niet werkt.
Als je er even bij zet of het inloggen bijvoorbeeld niet lukt, dan hebben wij er meer aan.
0
Freestyle

Lid · Topicstarter

Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Sebastiaanh schreef:
Aan "Lijkt me duidelijk. Hij werkt niet." kunnen wij niet weten WAT er niet werkt.
Als je er even bij zet of het inloggen bijvoorbeeld niet lukt, dan hebben wij er meer aan.
Ja dat weet ik niet. Het werkt gewoon niet. Ik weet niet waarom en waar het aan zou kunnen liggen. Buiten dat het aan het script licht.

Ik heb de gegevens ook dubbel gechekt enzo.
0
Berichten
1.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
kan je anders vertellen wat er (niet) gebreurt??
0
Berichten
28
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]    
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]functies.php[/COLOR][COLOR= #007700];[/COLOR]

 [COLOR= #0000BB]$ip[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]];[/COLOR]
 [COLOR= #0000BB]$datum[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"d-m-Y H:i"[/COLOR][COLOR= #007700]);[/COLOR]
 

    
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"admin"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"password"[/COLOR][COLOR= #007700]])) {[/COLOR] [COLOR= #FF8000]//check of sessie al bestaat[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je bent al ingelogd!<br>"[/COLOR][COLOR= #007700];[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href="loguit.php">Klik hier om uit te loggen</a>"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    
 [COLOR= #FF8000]//variabelen defenieren[/COLOR]
 [COLOR= #0000BB]$verzend[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"verzend"[/COLOR][COLOR= #007700]];[/COLOR]
 [COLOR= #0000BB]$admin[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/sha1"]sha1[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"admin"[/COLOR][COLOR= #007700]]);[/COLOR]
 [COLOR= #0000BB]$password[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/sha1"]sha1[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"password"[/COLOR][COLOR= #007700]]));[/COLOR]
 
 [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$verzend[/COLOR][COLOR= #007700]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$admin[/COLOR][COLOR= #007700]) &&[/COLOR]  [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$password[/COLOR][COLOR= #007700])) {[/COLOR] [COLOR= #FF8000]//check of $admin enzo wel bestaan[/COLOR]
     [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM `secure` WHERE code = "$admin" AND wachtwoord = "$password""[/COLOR][COLOR= #007700];[/COLOR]
     [COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]//voer sql uit[/COLOR]
     [COLOR= #0000BB]$rij[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]//zet sql resultaten in array[/COLOR]
    
     [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$admin[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$rij[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"admin"[/COLOR][COLOR= #007700]] &&[/COLOR] [COLOR= #0000BB]$password[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$rij[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"password"[/COLOR][COLOR= #007700]]) {[/COLOR] [COLOR= #FF8000]//check of $admin en password overeenkomt[/COLOR]
       [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"admin"[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$admin[/COLOR][COLOR= #007700];[/COLOR]      [COLOR= #FF8000]//maak de sessies admin[/COLOR]
          [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"password"[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$password[/COLOR][COLOR= #007700];[/COLOR]  [COLOR= #FF8000]//en password[/COLOR]
       [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je bent Nu ingelogd!!"[/COLOR][COLOR= #007700];[/COLOR]
         [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<Br><a href="index.php">Klik hier om naar de index te gaan</a>"[/COLOR][COLOR= #007700];
     }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
       [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt foute gegevens ingevuld!<br>"[/COLOR][COLOR= #007700];[/COLOR]
         [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href="javascript:history.back(1)">Klik hier om terug te gaan</a> of<br>"[/COLOR][COLOR= #007700];[/COLOR]
         [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href="registreer.php">Registreer</a><Br>"[/COLOR][COLOR= #007700];[/COLOR]
         [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
     }
 }[/COLOR]
?>    
    <!--  start loginbox ................................................................................. -->
    <div id="loginbox">
    
    <!--  start login-inner -->
    <div id="login-inner">
    <form action="login.php" method="POST">
        <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <th>Code</th>
            <td><input type="text"  name="admin" class="login-inp" /></td>
        </tr>
        <tr>
            <th>Password</th>
            <td><input type="password" name="password" value=""  onfocus="this.value=" class="login-inp" /></td>
        </tr>
        <tr>
            <th></th>
            <td><input type="submit" name="verzend" class="submit-login"  /></td>
        </tr>
        </table>
    </form>
    </div>
     <!--  end login-inner -->
    <div class="clear"></div>
`
    <a href="forgot" class="forgot-pwd">Forgot Password?</a>
    
 </div>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>


Probeer dit.
0
Freestyle

Lid · Topicstarter

Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Spoiler tonen
Itobias (link):

[COLOR= #0000BB]<?php[/COLOR]    
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]functies.php[/COLOR][COLOR= #007700];[/COLOR]

 [COLOR= #0000BB]$ip[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]];[/COLOR]
 [COLOR= #0000BB]$datum[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"d-m-Y H:i"[/COLOR][COLOR= #007700]);[/COLOR]
 

    
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"admin"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"password"[/COLOR][COLOR= #007700]])) {[/COLOR] [COLOR= #FF8000]//check of sessie al bestaat[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je bent al ingelogd!<br>"[/COLOR][COLOR= #007700];[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href="loguit.php">Klik hier om uit te loggen</a>"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    
 [COLOR= #FF8000]//variabelen defenieren[/COLOR]
 [COLOR= #0000BB]$verzend[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"verzend"[/COLOR][COLOR= #007700]];[/COLOR]
 [COLOR= #0000BB]$admin[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/sha1"]sha1[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"admin"[/COLOR][COLOR= #007700]]);[/COLOR]
 [COLOR= #0000BB]$password[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/sha1"]sha1[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"password"[/COLOR][COLOR= #007700]]));[/COLOR]
 
 [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$verzend[/COLOR][COLOR= #007700]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$admin[/COLOR][COLOR= #007700]) &&[/COLOR]  [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$password[/COLOR][COLOR= #007700])) {[/COLOR] [COLOR= #FF8000]//check of $admin enzo wel bestaan[/COLOR]
     [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM `secure` WHERE code = "$admin" AND wachtwoord = "$password""[/COLOR][COLOR= #007700];[/COLOR]
     [COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]//voer sql uit[/COLOR]
     [COLOR= #0000BB]$rij[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]//zet sql resultaten in array[/COLOR]
    
     [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$admin[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$rij[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"admin"[/COLOR][COLOR= #007700]] &&[/COLOR] [COLOR= #0000BB]$password[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$rij[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"password"[/COLOR][COLOR= #007700]]) {[/COLOR] [COLOR= #FF8000]//check of $admin en password overeenkomt[/COLOR]
       [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"admin"[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$admin[/COLOR][COLOR= #007700];[/COLOR]      [COLOR= #FF8000]//maak de sessies admin[/COLOR]
          [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"password"[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$password[/COLOR][COLOR= #007700];[/COLOR]  [COLOR= #FF8000]//en password[/COLOR]
       [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je bent Nu ingelogd!!"[/COLOR][COLOR= #007700];[/COLOR]
         [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<Br><a href="index.php">Klik hier om naar de index te gaan</a>"[/COLOR][COLOR= #007700];
     }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
       [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt foute gegevens ingevuld!<br>"[/COLOR][COLOR= #007700];[/COLOR]
         [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href="javascript:history.back(1)">Klik hier om terug te gaan</a> of<br>"[/COLOR][COLOR= #007700];[/COLOR]
         [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href="registreer.php">Registreer</a><Br>"[/COLOR][COLOR= #007700];[/COLOR]
         [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
     }
 }[/COLOR]
?>    
    <!--  start loginbox ................................................................................. -->
    <div id="loginbox">
    
    <!--  start login-inner -->
    <div id="login-inner">
    <form action="login.php" method="POST">
        <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <th>Code</th>
            <td><input type="text"  name="admin" class="login-inp" /></td>
        </tr>
        <tr>
            <th>Password</th>
            <td><input type="password" name="password" value=""  onfocus="this.value=" class="login-inp" /></td>
        </tr>
        <tr>
            <th></th>
            <td><input type="submit" name="verzend" class="submit-login"  /></td>
        </tr>
        </table>
    </form>
    </div>
     <!--  end login-inner -->
    <div class="clear"></div>
`
    <a href="forgot" class="forgot-pwd">Forgot Password?</a>
    
 </div>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
Probeer dit.

Hij doet het niet

Startpost aangepast!
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren