Ergebnis 1 bis 4 von 4

Thema: Wie baue ich reCAPTCHA richtig in meine Seite ein ? Hilfe!

  1. #1
    HTML Newbie
    Registriert seit
    29.10.2016
    Beiträge
    2
    Danke
    1
    Bekam 0 mal "Danke" in 0 Postings

    Frage Wie baue ich reCAPTCHA richtig in meine Seite ein ? Hilfe!

    Hey,
    ich wollte fragen wie ich zu meinem login und der regestrierungseite eine captcha einbauen kann.
    Ich habe es schon versucht aber ich weis nicht was für ein script man brauch das man nur sich einloggen/regestrieren kann wenn man das captcha macht.
    Ich brauche hilfe welchen script ich brauche und wo ich ihn einsetzten sollte

    Hier sind die php scripte: login.php + Regestrieren.php
    Download link:
    Login: http://www.mediafire.com/file/h8diw2i4stj8h97/login.php
    Reg.: http://www.mediafire.com/file/chca7c...a/register.php

    PHP-Code:
    <?php
    ob_start
    ();
    if(
    file_exists("install.php") == "1"){    header('Location: install.php');    exit();}
    include 
    'inc/database.php';
    $result mysqli_query($con"SELECT * FROM `settings` LIMIT 1") or die(mysqli_error($con));while($row mysqli_fetch_assoc($result)){    $website $row['website'];    $favicon $row['favicon'];}$result mysqli_query($con"SELECT * FROM `users`") or die(mysqli_error($con));while($row mysqli_fetch_assoc($result)){    $date $row['date'];    $ip $row['ip'];}
    if (!isset(
    $_SESSION)) {     session_start(); }
    if (isset(
    $_SESSION['username'])) {    header('Location: index.php');    exit();}
    if(isset(
    $_POST['username']) && isset($_POST['password'])){
        
    $username mysqli_real_escape_string($con$_POST['username']);    $password mysqli_real_escape_string($con, ($_POST['password']));        $result mysqli_query($con"SELECT * FROM `users` WHERE `username` = '$username'") or die(mysqli_error($con));    if(mysqli_num_rows($result) < 1){        header("Location: login.php?error=incorrect-password");    }    while($row mysqli_fetch_array($result)){        if($password != $row['password']){            header("Location: login.php?error=incorrect-password");        }elseif($row['status'] == "0"){            header("Location: login.php?error=banned");        }else{            $_SESSION['id'] = $row['id'];            $_SESSION['username'] = $username;            $_SESSION['email'] = $row['email'];            $_SESSION['rank'] = $row['rank'];            $_SESSION['ip'] = $row['ip'];            $_SESSION['date'] = $row['date'];            $_SESSION['last_online'] = $row['last_online'];            header("Location: index.php");        }    }    }
    ?><!DOCTYPE html><html lang="en"><head>        


        <title><?php echo $website?> - Login</title>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />           <link rel="shortcut icon" href="<?php echo $favicon;?>">               <link href="css/stylesheets.css" rel="stylesheet" type="text/css" />            <link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>        <script type='text/javascript' src='js/plugins/jquery/jquery.min.js'></script>    <script type='text/javascript' src='js/plugins/jquery/jquery-ui.min.js'></script>       <script type='text/javascript' src='js/plugins/jquery/jquery-migrate.min.js'></script>     <script type='text/javascript' src='js/plugins/jquery/globalize.js'></script>        <script type='text/javascript' src='js/plugins/bootstrap/bootstrap.min.js'></script>        <script type='text/javascript' src='js/plugins/uniform/jquery.uniform.min.js'></script>        <script type='text/javascript' src='js/plugins.js'></script>        <script type='text/javascript' src='js/actions.js'></script>    </head><body class="bg-img-num1"> <!--Start of Tawk.to Script--><script type="text/javascript">var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();(function(){var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];s1.async=true;s1.src='https://embed.tawk.to/5812090da4209520469a4aaf/default';s1.charset='UTF-8';s1.setAttribute('crossorigin','*');s0.parentNode.insertBefore(s1,s0);})();</script><!--End of Tawk.to Script-->        <div class="container">        <br /><br /><br /> <center><p style="font-size: 100pt; font-family: 'Lobster', cursive; text-shadow: 3px 3px 3px #000; "> <?php echo $website?></p></center>
                            <div class="login-block">            <div class="block block-transparent">                <div class="head">                    <div class="user">                        <div class="info user-change">                                                                                                            <img src="../img/pb1.jpg" class="img-circle img-thumbnail"/>                                                                                            </div>                                                </div>                </div> <form class="form-signin" action="login.php" method="POST">                              <div class="content controls npt">                    <div class="form-row user-change-row">                        <div class="col-md-12">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-user"></span>                                </div>                                <input type="text" class="form-control" placeholder="Login"/>                            </div>                        </div>                    </div>                    <div class="form-row">                        <div class="col-md-12">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-user"></span>                                </div>                                  <input type="text" id="username" name="username" class="form-control" placeholder="Username" autofocus>                            </div>                        </div>                    </div>                      <div class="form-row">                        <div class="col-md-12">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-key"></span>                                </div>                                 <input type="password" id="password" name="password" class="form-control" placeholder="Passwort">                            </div>                        </div>                    </div>                                                <div class="form-row">                             <div class="col-md-6">                            <a href="register.php" class="btn btn-default btn-block btn-clean">Registrieren</a>                                                        </div>                        <div class="col-md-6">                            <button class="btn btn-default btn-block btn-clean" type="submit">                                Login                            </button>                        </div>                                                 <html>                        </div>                          </form>                </div>            </div>        </div>
        </div>        <marquee behavior="alternate" direction="left" scrolldelay="6" scrollamount="6"><font face="Comic Sans MS" size="6" color="#FF0000"> Zahlung nur per Paysafecard! ~> Facebook: Lasse Rau <~</marquee>



        <!-- js placed at the end of the document so the pages load faster -->    <script src="js/jquery.js"></script>    <script src="js/bootstrap.min.js"></script>        <?php    if(isset($_GET['error'])){        echo "<script type='text/javascript'>                $(document).ready(function(){                $('#error').modal('show');                });              </script>"        ;    }    ?>        <?php     if($_GET['error'] == "banned"){        echo '            <div class="modal fade" id="error" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top: 15%; overflow-y: visible; display: none;">                <div class="modal-dialog modal-sm">                    <div class="modal-content panel-danger">                        <div class="modal-header panel-heading">                            <center><h3 style="margin:0;"><i class="icon-warning-sign"></i> Ups..!</h3></center>                        </div>                        <div class="modal-body">                            <center>                                <strong> Dein Account wurde gebannt.</strong>                            </center>                        </div>                    </div>                </div>            </div>        ';    }
        if(
    $_GET['error'] == "incorrect-password"){        echo '            <div class="modal fade" id="error" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top: 15%; overflow-y: visible; display: none;">                <div class="modal-dialog modal-sm">                    <div class="modal-content panel-danger">                        <div class="modal-header panel-heading">                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><font color="black">&times;</button></font>                            <center><h3 style="margin:0;"><i class="icon-warning-sign"></i> Ups..</h3></center>                        </div>                        <div class="modal-body">                            <center>                                <strong>Die Einloggdaten sind falsch, oder es gibt diesen Account nicht..</strong>                            </center>                        </div>                    </div>                </div>            </div>        ';    }        if($_GET['error'] == "not-logged-in"){        echo '            <div class="modal fade" id="error" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top: 15%; overflow-y: visible; display: none;">                <div class="modal-dialog modal-sm">                    <div class="modal-content panel-warning">                        <div class="modal-header panel-heading">                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><font color="black">&times;</button></font>                            <center><h3 style="margin:0;"><i class="icon-warning-sign"></i> Ups..!</h3></center>                        </div>                        <div class="modal-body">                            <center>                                <strong>Du musst dich zuerst einloggen</strong>                            </center>                        </div>                    </div>                </div>            </div>        ';    }    ?><script>        !function ($) {            $(document).on("click","ul.nav li.parent > a > span.icon", function(){                          $(this).find('em:first').toggleClass("glyphicon-minus");                  });             $(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");        }(window.jQuery);
            $(window).on('resize', function () {          if ($(window).width() > 768) $('#sidebar-collapse').collapse('show')        })        $(window).on('resize', function () {          if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')        })    </script>            <embed id="player1" name="player1"width="0" height="0"src="Hund.mp3"allowscriptaccess="always"allowfullscreen="true"flashvars="Hund.mp3"></embed> </html
    PHP-Code:
    <?php
    ob_start
    ();
    if(
    file_exists("install.php") == "1"){    header('Location: install.php');    exit();}
    include 
    'inc/database.php';
    $result mysqli_query($con"SELECT * FROM `settings` LIMIT 1") or die(mysqli_error($con));while($row mysqli_fetch_assoc($result)){    $website $row['website'];    $favicon $row['favicon'];}
    if (!isset(
    $_SESSION)) {     session_start(); }
    if (isset(
    $_SESSION['username'])) {    header('Location: index.php');    exit();}
    if(isset(
    $_POST['username']) && isset($_POST['password']) && isset($_POST['confirmpassword']) && isset($_POST['email'])){
        
    $username mysqli_real_escape_string($con$_POST['username']);    $password mysqli_real_escape_string($con, ($_POST['password']));    $confirmpassword mysqli_real_escape_string($con, ($_POST['confirmpassword']));    $email mysqli_real_escape_string($con$_POST['email']);        if($password != $confirmpassword){        die("The confirmation password was not equal to the password.");    }        if(!filter_var($emailFILTER_VALIDATE_EMAIL)) {        die("The email entered was not correct.");    }        $result mysqli_query($con"SELECT * FROM `users` WHERE `username` = '$username'") or die(mysqli_error($con));    if(mysqli_num_rows($result) > 0){        die("This username already exists.");    }        $result mysqli_query($con"SELECT * FROM `users` WHERE `email` = '$email'") or die(mysqli_error($con));    if(mysqli_num_rows($result) > 0){        die("This email already exists.");    }        $ip mysqli_real_escape_string($con$_SERVER['REMOTE_ADDR']);    $date date('Y-m-d');    $last_online date('Y-m-d h:i:s');            mysqli_query($con"INSERT INTO `users` (`username`, `password`, `email`, `date`, `ip`) VALUES ('$username', '$password', '$email', '$date', '$ip')") or die(mysqli_error($con));        header("Location: login.php?action=registered");    }
    ?><!DOCTYPE html><html lang="en"><head>            <title><?php echo $website?> - Registrieren</title>        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />        <link rel="shortcut icon" href="<?php echo $favicon;?>">        <link href="css/stylesheets.css" rel="stylesheet" type="text/css" />            <link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>        <script type='text/javascript' src='js/plugins/jquery/jquery.min.js'></script>    <script type='text/javascript' src='js/plugins/jquery/jquery-ui.min.js'></script>       <script type='text/javascript' src='js/plugins/jquery/jquery-migrate.min.js'></script>    <script type='text/javascript' src='js/plugins/jquery/globalize.js'></script>        <script type='text/javascript' src='js/plugins/bootstrap/bootstrap.min.js'></script>        <script type='text/javascript' src='js/plugins/uniform/jquery.uniform.min.js'></script>        <script type='text/javascript' src='js/plugins.js'></script>        <script type='text/javascript' src='js/actions.js'></script>    <script type='text/javascript' src='js/settings.js'></script></head><body class="bg-img-num1">         <div class="container">        
            <div class="registration-block">            <div class="block block-transparent">                <div class="head tac">                                     <br /><br /><br /> <center><p style="font-size: 100pt; font-family: 'Lobster', cursive; text-shadow: 3px 3px 3px #000; "> <?php echo $website?></p></center> <br /><br />                </div>                <div class="content controls npt">
                              <form class="form-signin" action="register.php" method="POST">                           <div class="form-row" style="margin-top: 10px;">                        <div class="col-md-6">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-key"></span>                                </div>                                <input type="text" id="username" name="username" class="form-control" placeholder="Username" autofocus>                                                          </div>                        </div>                        <div class="col-md-6">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-envelope"></span>                                </div>                               <input type="text" id="email" name="email" class="form-control" placeholder="Email">                            </div>                        </div>                    </div>                                        <div class="form-row">                        <div class="col-md-6">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-lock"></span>                                </div>                               <input type="password" id="password" name="password" class="form-control" placeholder="Passwort">                            </div>                        </div>                        <div class="col-md-6">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-unlock-alt"></span>                                </div>                                <input type="password" id="confirmpassword" name="confirmpassword" class="form-control" placeholder="Passwort Wiederholung">                            </div>                        </div>                    </div>                                                                           <div class="form-row">                        <div class="col-md-12">                           <button class="btn btn-default btn-block btn-clean" type="submit">                                Registrieren                            </button>                        </div>                    </div>                                        <div class="form-row">                        <div class="col-md-12 tac"><strong>OR USE</strong></div>                    </div>                    <div class="form-row">                       <div class="col-md-12">                            <a href="login.php" class="btn btn-default btn-block btn-clean">Login</a>                                                        </div>                    </div>                                    </div>            </div>        </div>
        </div>
    </body></html>
    Vielen Dank für eure Hilfe
    Achtung: Dies ist ein alter Thread im HTML und Webmaster Forum
    Diese Diskussion ist älter als 90 Tage. Die darin enthaltenen Informationen sind möglicherweise nicht mehr aktuell. Erstelle bitte zu deiner Frage ein neues Thema im Forum !!!!!
    Geändert von DissMYKick (29.10.2016 um 16:34 Uhr)

  2. #2
    König(in)
    Registriert seit
    13.06.2012
    Beiträge
    1.124
    Danke
    14
    Bekam 61 mal "Danke" in 59 Postings

    Standard AW: Wie baue ich reCAPTCHA richtig in meine Seite ein ? Hilfe!

    Für das Anzeigen von Code gibt es in dieser Forensoftware einen speziellen Button. Da steht klein PHP drin. Von unbekannten Seiten downloaden? Nö danke

  3. Folgende User finden die Antwort von Gastl gut:


  4. #3
    HTML Newbie
    Themenstarter

    Registriert seit
    29.10.2016
    Beiträge
    2
    Danke
    1
    Bekam 0 mal "Danke" in 0 Postings

    Standard AW: Wie baue ich reCAPTCHA richtig in meine Seite ein ? Hilfe!

    [PHP
    ]<?php

    ob_start();


    if(file_exists("install.php") == "1"){
    header('Location: install.php');
    exit();
    }


    include 'inc/database.php';


    $result = mysqli_query($con, "SELECT * FROM `settings` LIMIT 1") or die(mysqli_error($con));
    while($row = mysqli_fetch_assoc($result)){
    $website = $row['website'];
    $favicon = $row['favicon'];
    }
    $result = mysqli_query($con, "SELECT * FROM `users`") or die(mysqli_error($con));
    while($row = mysqli_fetch_assoc($result)){
    $date = $row['date'];
    $ip = $row['ip'];
    }


    if (!isset($_SESSION)) {
    session_start();
    }


    if (isset($_SESSION['username'])) {
    header('Location: index.php');
    exit();
    }


    if(isset($_POST['username']) && isset($_POST['password'])){


    $username = mysqli_real_escape_string($con, $_POST['username']);
    $password = mysqli_real_escape_string($con, ($_POST['password']));

    $result = mysqli_query($con, "SELECT * FROM `users` WHERE `username` = '$username'") or die(mysqli_error($con));
    if(mysqli_num_rows($result) < 1){
    header("Location: login.php?error=incorrect-password");
    }
    while($row = mysqli_fetch_array($result)){
    if($password != $row['password']){
    header("Location: login.php?error=incorrect-password");
    }elseif($row['status'] == "0"){
    header("Location: login.php?error=banned");
    }else{
    $_SESSION['id'] = $row['id'];
    $_SESSION['username'] = $username;
    $_SESSION['email'] = $row['email'];
    $_SESSION['rank'] = $row['rank'];
    $_SESSION['ip'] = $row['ip'];
    $_SESSION['date'] = $row['date'];
    $_SESSION['last_online'] = $row['last_online'];
    header("Location: index.php");
    }
    }

    }


    ?>
    <!DOCTYPE html>
    <html lang="en">
    <head>






    <title><?php echo $website; ?> - Login</title>



    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <link rel="shortcut icon" href="<?php echo $favicon;?>">


    <link href="css/stylesheets.css" rel="stylesheet" type="text/css" />
    <link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>

    <script type='text/javascript' src='js/plugins/jquery/jquery.min.js'></script>
    <script type='text/javascript' src='js/plugins/jquery/jquery-ui.min.js'></script>
    <script type='text/javascript' src='js/plugins/jquery/jquery-migrate.min.js'></script>
    <script type='text/javascript' src='js/plugins/jquery/globalize.js'></script>
    <script type='text/javascript' src='js/plugins/bootstrap/bootstrap.min.js'></script>

    <script type='text/javascript' src='js/plugins/uniform/jquery.uniform.min.js'></script>

    <script type='text/javascript' src='js/plugins.js'></script>
    <script type='text/javascript' src='js/actions.js'></script>
    </head>
    <body class="bg-img-num1">
    <!--Start of Tawk.to Script-->
    <script type="text/javascript">
    var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
    (function(){
    var s1=document.createElement("script"),s0=document.ge tElementsByTagName("script")[0];
    s1.async=true;
    s1.src='https://embed.tawk.to/5812090da4209520469a4aaf/default';
    s1.charset='UTF-8';
    s1.setAttribute('crossorigin','*');
    s0.parentNode.insertBefore(s1,s0);
    })();
    </script>
    <!--End of Tawk.to Script-->

    <div class="container">
    <br /><br /><br /> <center><p style="font-size: 100pt; font-family: 'Lobster', cursive; text-shadow: 3px 3px 3px #000; "> <?php echo $website; ?></p></center>



    <div class="login-block">
    <div class="block block-transparent">
    <div class="head">
    <div class="user">
    <div class="info user-change">
    <img src="../img/pb1.jpg" class="img-circle img-thumbnail"/>


    </div>
    </div>
    </div>
    <form class="form-signin" action="login.php" method="POST">
    <div class="content controls npt">
    <div class="form-row user-change-row">
    <div class="col-md-12">
    <div class="input-group">
    <div class="input-group-addon">
    <span class="icon-user"></span>
    </div>
    <input type="text" class="form-control" placeholder="Login"/>
    </div>
    </div>
    </div>
    <div class="form-row">
    <div class="col-md-12">
    <div class="input-group">
    <div class="input-group-addon">
    <span class="icon-user"></span>
    </div>
    <input type="text" id="username" name="username" class="form-control" placeholder="Username" autofocus>
    </div>
    </div>
    </div>
    <div class="form-row">
    <div class="col-md-12">
    <div class="input-group">
    <div class="input-group-addon">
    <span class="icon-key"></span>
    </div>
    <input type="password" id="password" name="password" class="form-control" placeholder="Passwort">
    </div>
    </div>
    </div>
    <div class="form-row">

    <div class="col-md-6">
    <a href="register.php" class="btn btn-default btn-block btn-clean">Registrieren</a>
    </div>
    <div class="col-md-6">
    <button class="btn btn-default btn-block btn-clean" type="submit">
    Login
    </button>
    </div>

    <html>

    </div>
    </form>
    </div>
    </div>
    </div>


    </div>

    <marquee behavior="alternate" direction="left" scrolldelay="6" scrollamount="6"><font face="Comic Sans MS" size="6" color="#FF0000"> Zahlung nur per Paysafecard! ~> Facebook: Lasse Rau <~
    </marquee>








    <!-- js placed at the end of the document so the pages load faster -->
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap.min.js"></script>

    <?php
    if(isset($_GET['error'])){
    echo "<script type='text/javascript'>
    $(document).ready(function(){
    $('#error').modal('show');
    });
    </script>"
    ;
    }
    ?>
    <?php
    if($_GET['error'] == "banned"){
    echo '
    <div class="modal fade" id="error" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top: 15%; overflow-y: visible; display: none;">
    <div class="modal-dialog modal-sm">
    <div class="modal-content panel-danger">
    <div class="modal-header panel-heading">
    <center><h3 style="margin:0;"><i class="icon-warning-sign"></i> Ups..!</h3></center>
    </div>
    <div class="modal-body">
    <center>
    <strong> Dein Account wurde gebannt.</strong>
    </center>
    </div>
    </div>
    </div>
    </div>
    ';
    }


    if($_GET['error'] == "incorrect-password"){
    echo '
    <div class="modal fade" id="error" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top: 15%; overflow-y: visible; display: none;">
    <div class="modal-dialog modal-sm">
    <div class="modal-content panel-danger">
    <div class="modal-header panel-heading">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><font color="black">&times;</button></font>
    <center><h3 style="margin:0;"><i class="icon-warning-sign"></i> Ups..</h3></center>
    </div>
    <div class="modal-body">
    <center>
    <strong>Die Einloggdaten sind falsch, oder es gibt diesen Account nicht..</strong>
    </center>
    </div>
    </div>
    </div>
    </div>
    ';
    }

    if($_GET['error'] == "not-logged-in"){
    echo '
    <div class="modal fade" id="error" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top: 15%; overflow-y: visible; display: none;">
    <div class="modal-dialog modal-sm">
    <div class="modal-content panel-warning">
    <div class="modal-header panel-heading">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><font color="black">&times;</button></font>
    <center><h3 style="margin:0;"><i class="icon-warning-sign"></i> Ups..!</h3></center>
    </div>
    <div class="modal-body">
    <center>
    <strong>Du musst dich zuerst einloggen</strong>
    </center>
    </div>
    </div>
    </div>
    </div>
    ';
    }
    ?>
    <script>
    !function ($) {
    $(document).on("click","ul.nav li.parent > a > span.icon", function(){
    $(this).find('em:first').toggleClass("glyphicon-minus");
    });
    $(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");
    }(window.jQuery);


    $(window).on('resize', function () {
    if ($(window).width() > 76 $('#sidebar-collapse').collapse('show')
    })
    $(window).on('resize', function () {
    if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')
    })
    </script>

    <embed id="player1" name="player1"
    width="0" height="0"
    src="Hund.mp3"
    allowscriptaccess="always"
    allowfullscreen="true"
    flashvars="Hund.mp3">
    </embed>
    </html
    [/PHP]
    PHP-Code:
    <?php
    ob_start
    ();
    if(
    file_exists("install.php") == "1"){    header('Location: install.php');    exit();}
    include 
    'inc/database.php';
    $result mysqli_query($con"SELECT * FROM `settings` LIMIT 1") or die(mysqli_error($con));while($row mysqli_fetch_assoc($result)){    $website $row['website'];    $favicon $row['favicon'];}
    if (!isset(
    $_SESSION)) {     session_start(); }
    if (isset(
    $_SESSION['username'])) {    header('Location: index.php');    exit();}
    if(isset(
    $_POST['username']) && isset($_POST['password']) && isset($_POST['confirmpassword']) && isset($_POST['email'])){
        
    $username mysqli_real_escape_string($con$_POST['username']);    $password mysqli_real_escape_string($con, ($_POST['password']));    $confirmpassword mysqli_real_escape_string($con, ($_POST['confirmpassword']));    $email mysqli_real_escape_string($con$_POST['email']);        if($password != $confirmpassword){        die("The confirmation password was not equal to the password.");    }        if(!filter_var($emailFILTER_VALIDATE_EMAIL)) {        die("The email entered was not correct.");    }        $result mysqli_query($con"SELECT * FROM `users` WHERE `username` = '$username'") or die(mysqli_error($con));    if(mysqli_num_rows($result) > 0){        die("This username already exists.");    }        $result mysqli_query($con"SELECT * FROM `users` WHERE `email` = '$email'") or die(mysqli_error($con));    if(mysqli_num_rows($result) > 0){        die("This email already exists.");    }        $ip mysqli_real_escape_string($con$_SERVER['REMOTE_ADDR']);    $date date('Y-m-d');    $last_online date('Y-m-d h:i:s');            mysqli_query($con"INSERT INTO `users` (`username`, `password`, `email`, `date`, `ip`) VALUES ('$username', '$password', '$email', '$date', '$ip')") or die(mysqli_error($con));        header("Location: login.php?action=registered");    }
    ?><!DOCTYPE html><html lang="en"><head>            <title><?php echo $website?> - Registrieren</title>        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />        <link rel="shortcut icon" href="<?php echo $favicon;?>">        <link href="css/stylesheets.css" rel="stylesheet" type="text/css" />            <link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>        <script type='text/javascript' src='js/plugins/jquery/jquery.min.js'></script>    <script type='text/javascript' src='js/plugins/jquery/jquery-ui.min.js'></script>       <script type='text/javascript' src='js/plugins/jquery/jquery-migrate.min.js'></script>    <script type='text/javascript' src='js/plugins/jquery/globalize.js'></script>        <script type='text/javascript' src='js/plugins/bootstrap/bootstrap.min.js'></script>        <script type='text/javascript' src='js/plugins/uniform/jquery.uniform.min.js'></script>        <script type='text/javascript' src='js/plugins.js'></script>        <script type='text/javascript' src='js/actions.js'></script>    <script type='text/javascript' src='js/settings.js'></script></head><body class="bg-img-num1">         <div class="container">        
            <div class="registration-block">            <div class="block block-transparent">                <div class="head tac">                                     <br /><br /><br /> <center><p style="font-size: 100pt; font-family: 'Lobster', cursive; text-shadow: 3px 3px 3px #000; "> <?php echo $website?></p></center> <br /><br />                </div>                <div class="content controls npt">
                              <form class="form-signin" action="register.php" method="POST">                           <div class="form-row" style="margin-top: 10px;">                        <div class="col-md-6">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-key"></span>                                </div>                                <input type="text" id="username" name="username" class="form-control" placeholder="Username" autofocus>                                                          </div>                        </div>                        <div class="col-md-6">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-envelope"></span>                                </div>                               <input type="text" id="email" name="email" class="form-control" placeholder="Email">                            </div>                        </div>                    </div>                                        <div class="form-row">                        <div class="col-md-6">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-lock"></span>                                </div>                               <input type="password" id="password" name="password" class="form-control" placeholder="Passwort">                            </div>                        </div>                        <div class="col-md-6">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-unlock-alt"></span>                                </div>                                <input type="password" id="confirmpassword" name="confirmpassword" class="form-control" placeholder="Passwort Wiederholung">                            </div>                        </div>                    </div>                                                                           <div class="form-row">                        <div class="col-md-12">                           <button class="btn btn-default btn-block btn-clean" type="submit">                                Registrieren                            </button>                        </div>                    </div>                                        <div class="form-row">                        <div class="col-md-12 tac"><strong>OR USE</strong></div>                    </div>                    <div class="form-row">                       <div class="col-md-12">                            <a href="login.php" class="btn btn-default btn-block btn-clean">Login</a>                                                        </div>                    </div>                                    </div>            </div>        </div>
        </div>
    </body></html>
    Ich bedanke mich jetzt schonmal <3

    - - - Aktualisiert - - -

    PHP-Code:
    <?php
    ob_start
    ();
    if(
    file_exists("install.php") == "1"){    header('Location: install.php');    exit();}
    include 
    'inc/database.php';
    $result mysqli_query($con"SELECT * FROM `settings` LIMIT 1") or die(mysqli_error($con));while($row mysqli_fetch_assoc($result)){    $website $row['website'];    $favicon $row['favicon'];}$result mysqli_query($con"SELECT * FROM `users`") or die(mysqli_error($con));while($row mysqli_fetch_assoc($result)){    $date $row['date'];    $ip $row['ip'];}
    if (!isset(
    $_SESSION)) {     session_start(); }
    if (isset(
    $_SESSION['username'])) {    header('Location: index.php');    exit();}
    if(isset(
    $_POST['username']) && isset($_POST['password'])){
        
    $username mysqli_real_escape_string($con$_POST['username']);    $password mysqli_real_escape_string($con, ($_POST['password']));        $result mysqli_query($con"SELECT * FROM `users` WHERE `username` = '$username'") or die(mysqli_error($con));    if(mysqli_num_rows($result) < 1){        header("Location: login.php?error=incorrect-password");    }    while($row mysqli_fetch_array($result)){        if($password != $row['password']){            header("Location: login.php?error=incorrect-password");        }elseif($row['status'] == "0"){            header("Location: login.php?error=banned");        }else{            $_SESSION['id'] = $row['id'];            $_SESSION['username'] = $username;            $_SESSION['email'] = $row['email'];            $_SESSION['rank'] = $row['rank'];            $_SESSION['ip'] = $row['ip'];            $_SESSION['date'] = $row['date'];            $_SESSION['last_online'] = $row['last_online'];            header("Location: index.php");        }    }    }
    ?><!DOCTYPE html><html lang="en"><head>        


        <title><?php echo $website?> - Login</title>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />           <link rel="shortcut icon" href="<?php echo $favicon;?>">               <link href="css/stylesheets.css" rel="stylesheet" type="text/css" />            <link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>        <script type='text/javascript' src='js/plugins/jquery/jquery.min.js'></script>    <script type='text/javascript' src='js/plugins/jquery/jquery-ui.min.js'></script>       <script type='text/javascript' src='js/plugins/jquery/jquery-migrate.min.js'></script>     <script type='text/javascript' src='js/plugins/jquery/globalize.js'></script>        <script type='text/javascript' src='js/plugins/bootstrap/bootstrap.min.js'></script>        <script type='text/javascript' src='js/plugins/uniform/jquery.uniform.min.js'></script>        <script type='text/javascript' src='js/plugins.js'></script>        <script type='text/javascript' src='js/actions.js'></script>    </head><body class="bg-img-num1"> <!--Start of Tawk.to Script--><script type="text/javascript">var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();(function(){var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];s1.async=true;s1.src='https://embed.tawk.to/5812090da4209520469a4aaf/default';s1.charset='UTF-8';s1.setAttribute('crossorigin','*');s0.parentNode.insertBefore(s1,s0);})();</script><!--End of Tawk.to Script-->        <div class="container">        <br /><br /><br /> <center><p style="font-size: 100pt; font-family: 'Lobster', cursive; text-shadow: 3px 3px 3px #000; "> <?php echo $website?></p></center>
                            <div class="login-block">            <div class="block block-transparent">                <div class="head">                    <div class="user">                        <div class="info user-change">                                                                                                            <img src="../img/pb1.jpg" class="img-circle img-thumbnail"/>                                                                                            </div>                                                </div>                </div> <form class="form-signin" action="login.php" method="POST">                              <div class="content controls npt">                    <div class="form-row user-change-row">                        <div class="col-md-12">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-user"></span>                                </div>                                <input type="text" class="form-control" placeholder="Login"/>                            </div>                        </div>                    </div>                    <div class="form-row">                        <div class="col-md-12">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-user"></span>                                </div>                                  <input type="text" id="username" name="username" class="form-control" placeholder="Username" autofocus>                            </div>                        </div>                    </div>                      <div class="form-row">                        <div class="col-md-12">                            <div class="input-group">                                <div class="input-group-addon">                                    <span class="icon-key"></span>                                </div>                                 <input type="password" id="password" name="password" class="form-control" placeholder="Passwort">                            </div>                        </div>                    </div>                                                <div class="form-row">                             <div class="col-md-6">                            <a href="register.php" class="btn btn-default btn-block btn-clean">Registrieren</a>                                                        </div>                        <div class="col-md-6">                            <button class="btn btn-default btn-block btn-clean" type="submit">                                Login                            </button>                        </div>                                                 <html>                        </div>                          </form>                </div>            </div>        </div>
        </div>        <marquee behavior="alternate" direction="left" scrolldelay="6" scrollamount="6"><font face="Comic Sans MS" size="6" color="#FF0000"> Zahlung nur per Paysafecard! ~> Facebook: Lasse Rau <~</marquee>



        <!-- js placed at the end of the document so the pages load faster -->    <script src="js/jquery.js"></script>    <script src="js/bootstrap.min.js"></script>        <?php    if(isset($_GET['error'])){        echo "<script type='text/javascript'>                $(document).ready(function(){                $('#error').modal('show');                });              </script>"        ;    }    ?>        <?php     if($_GET['error'] == "banned"){        echo '            <div class="modal fade" id="error" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top: 15%; overflow-y: visible; display: none;">                <div class="modal-dialog modal-sm">                    <div class="modal-content panel-danger">                        <div class="modal-header panel-heading">                            <center><h3 style="margin:0;"><i class="icon-warning-sign"></i> Ups..!</h3></center>                        </div>                        <div class="modal-body">                            <center>                                <strong> Dein Account wurde gebannt.</strong>                            </center>                        </div>                    </div>                </div>            </div>        ';    }
        if(
    $_GET['error'] == "incorrect-password"){        echo '            <div class="modal fade" id="error" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top: 15%; overflow-y: visible; display: none;">                <div class="modal-dialog modal-sm">                    <div class="modal-content panel-danger">                        <div class="modal-header panel-heading">                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><font color="black">&times;</button></font>                            <center><h3 style="margin:0;"><i class="icon-warning-sign"></i> Ups..</h3></center>                        </div>                        <div class="modal-body">                            <center>                                <strong>Die Einloggdaten sind falsch, oder es gibt diesen Account nicht..</strong>                            </center>                        </div>                    </div>                </div>            </div>        ';    }        if($_GET['error'] == "not-logged-in"){        echo '            <div class="modal fade" id="error" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top: 15%; overflow-y: visible; display: none;">                <div class="modal-dialog modal-sm">                    <div class="modal-content panel-warning">                        <div class="modal-header panel-heading">                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><font color="black">&times;</button></font>                            <center><h3 style="margin:0;"><i class="icon-warning-sign"></i> Ups..!</h3></center>                        </div>                        <div class="modal-body">                            <center>                                <strong>Du musst dich zuerst einloggen</strong>                            </center>                        </div>                    </div>                </div>            </div>        ';    }    ?><script>        !function ($) {            $(document).on("click","ul.nav li.parent > a > span.icon", function(){                          $(this).find('em:first').toggleClass("glyphicon-minus");                  });             $(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");        }(window.jQuery);
            $(window).on('resize', function () {          if ($(window).width() > 768) $('#sidebar-collapse').collapse('show')        })        $(window).on('resize', function () {          if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')        })    </script>            <embed id="player1" name="player1"width="0" height="0"src="Hund.mp3"allowscriptaccess="always"allowfullscreen="true"flashvars="Hund.mp3"></embed> </html

    Vielen Dank schonmal das hier ist der Login :9 <3

  5. #4
    Moderator Avatar von Arne Drews
    Registriert seit
    20.01.2016
    Ort
    Friedrichstadt, NF
    Beiträge
    1.139
    Danke
    21
    Bekam 116 mal "Danke" in 115 Postings

    Standard AW: Wie baue ich reCAPTCHA richtig in meine Seite ein ? Hilfe!

    Warum die User mit nervigen (re)Captchas belästigen, wenn das googlen nach Captcha Alternativen so einfach ist...

Ähnliche Themen

  1. Hilfe - Formular mit ReCaptcha
    Von jbacd im Forum PHP Forum - Apache - CGI - Perl - JavaScript und Co.
    Antworten: 1
    Letzter Beitrag: 20.01.2016, 21:48
  2. Hilfe Seite wird nicht richtig dargestellt
    Von Philipp2007 im Forum HTML & CSS Forum
    Antworten: 2
    Letzter Beitrag: 08.12.2012, 14:38
  3. Netscape un IE zeigen meine myspace Seite nicht richtig an
    Von MarsAtaya im Forum HTML & CSS Forum
    Antworten: 5
    Letzter Beitrag: 28.07.2007, 21:31
  4. IE zeigt meine Homepage nicht mehr richtig an! Brauche hilfe
    Von my-life im Forum HTML & CSS Forum
    Antworten: 2
    Letzter Beitrag: 17.12.2006, 17:08
  5. Hilfe, meine Seite hoppst zur Seite
    Von roxxter im Forum HTML & CSS Forum
    Antworten: 3
    Letzter Beitrag: 18.05.2005, 15:28

Stichworte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •